public List < WebElement > findExpectedElements ( By by ) { waitForLoaders ( ) ; try { return new WebDriverWait ( getWebDriver ( ) , getSeleniumManager ( ) . getTimeout ( ) ) . until ( ExpectedConditions . presenceOfAllElementsLocatedBy ( by ) ) ; } catch ( WebDriverException wde ) { log . error ( "Expected elements not found: " , wde ) ; fail ( "Element: " + by . toString ( ) + " not found after waiting for " + getSeleniumManager ( ) . getTimeout ( ) + " seconds. Webdriver though exception: " + wde . getClass ( ) . getCanonicalName ( ) + " with error message: " + wde . getMessage ( ) ) ; } return null ; }
Find all elements expected on the page