January 2018
Beginner to intermediate
354 pages
7h 59m
English
The following code is for the BrowserUtils.java class:
import org.openqa.selenium.*;import org.openqa.selenium.support.ui.ExpectedConditions;import org.openqa.selenium.support.ui.WebDriverWait;/** * @author Carl Cocchiaro * * Browser Utility Class * */public class BrowserUtils { /** * waitFor method to poll page title * * @param title * @param timer * @throws Exception */ public static void waitFor(String title, int timer) throws Exception { WebDriver driver = CreateDriver.getInstance().getDriver(); WebDriverWait exists = new WebDriverWait(driver, timer); exists.until(ExpectedConditions.refreshed( ExpectedConditions.titleContains(title))); } /** * waitForURL method to poll page URL * * @param url * @param timer * @throws ...
Read now
Unlock full access