Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java selenium wait

# explicitly wait
WebDriverWait wait;
wait = new WebDriverWait(driver, 10);
# define condition for wait - example: textToBe and className
wait.until(ExpectedConditions.textToBe(By.className()), "");

# sleep - will have to throw exception
Thread.sleep(1000);

# implictly wait
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
 
PREVIOUS NEXT
Tagged: #java #selenium #wait
ADD COMMENT
Topic
Name
9+1 =