Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static boolean isElementVisible(WebElement element, int timeOutInSeconds) {
- try {
- WebDriverWait wait = new WebDriverWait(driver, timeOutInSeconds);
- wait.until(ExpectedConditions.visibilityOf(element));
- return true;
- } catch (NoSuchElementException e) {
- return false;
- } catch (Exception e1) {
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement