Click here to Skip to main content
15,886,788 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm currently working on a code project to automate the checkout process for a website. I want to visually see the page load and do so at a slow methodical pace. I've done so with the driver.sleep function shown below...

driver.findElement(By.id('delivery_option8')).click();
driver.sleep(1000);
driver.findElement(By.id('submit_form')).click();
driver.sleep(100);

How can I change this to use the driver.wait function? I've been told this driver.sleep is sort of pointless to the checkout process. Any help would be greatly appreciated my experience with javascript is to a minimum so please be exact with your revised code response.

Thank you!
Posted
Comments
Sergey Alexandrovich Kryukov 5-Aug-15 10:49am    
What is the driver? Selenium's WebDriverJS? anything else?
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900