Selenium Essentials by Prashanth Sams

Selenium Essentials by Prashanth Sams

Author:Prashanth Sams [Sams, Prashanth]
Language: eng
Format: epub, pdf
Publisher: Packt Publishing
Published: 2015-03-26T22:00:00+00:00


Handling an explicit wait by locators (ID, name, XPath, CSS, and so on): The following is an alternative method to utilize an explicit wait. It waits for a specific locator until the expected conditions are fulfilled. The locator can be an ID, name, XPath, or CSS, among others:@Test public void Test01() throws Exception { driver.get(baseUrl + "/"); waitForID("value"); } public void waitForID(String id) { WebDriverWait wait = new WebDriverWait(driver, 10); wait.until (ExpectedConditions.presenceOfElementLocated(By.id(id))); }



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.