Created
January 29, 2020 18:30
-
-
Save brobles82/78cc6310523ab441a576a24be99a8495 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public WebElement findElement(By by) { | |
try { | |
WebDriverWait wait = new WebDriverWait(driver, 5); | |
return wait.until(ExpectedConditions.visibilityOfElementLocated(by)); | |
} catch (Exception e) { | |
return NullWebElement.getNull(); | |
} | |
} | |
public List<WebElement> findElements(By by) { | |
WebDriverWait wait = new WebDriverWait(driver, 5); | |
return wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(by)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment