Trabla: Selenium & java: execution time delay ( command to wait )
Solving:
Use Thread.sleep
Example:
public class Example{
public static void main(String[] args) throws Exception {
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
try {
Thread.sleep( 7000 ); // Wait for 7 seconds
} catch (InterruptedException e) {
e.printStackTrace();
}
driver.quit();
}
}
No comments:
Post a Comment