Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Selenium TestNG delay before actions

// this example was found written in @Test. (as rasau ne teste, o paciam kode)

// explicit wait - to wait for the compose button to be click-able
WebDriverWait wait = new WebDriverWait(driver,30);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//div[contains(text(),'COMPOSE')]")));
// click on the compose button as soon as the "compose" button is visible
driver.findElement(By.xpath("//div[contains(text(),'COMPOSE')]")).click();
Source by www.browserstack.com #
 
PREVIOUS NEXT
Tagged: #Selenium #TestNG #delay #actions
ADD COMMENT
Topic
Name
2+9 =