Java Code Examples for org.openqa.selenium.support.ui.WebDriverWait#pollingEvery()
The following examples show how to use
org.openqa.selenium.support.ui.WebDriverWait#pollingEvery() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SwetTest.java From SWET with MIT License | 6 votes |
@BeforeClass public static void beforeClassMethod() { // for self test the browser selection is hard-coded System.err.println("os: " + osName); if (osName.equals("windows")) { browser = "Chrome"; } else if (osName.startsWith("mac")) { browser = "safari"; } else { browser = "firefox"; } System.err.println("browser: " + browser); driver = BrowserDriver.initialize(browser); driver.manage().timeouts().setScriptTimeout(30, TimeUnit.SECONDS); wait = new WebDriverWait(driver, flexibleWait); wait.pollingEvery(pollingInterval, TimeUnit.MILLISECONDS); actions = new Actions(driver); }
Example 2
Source File: SwetImmutableListCopyOfExcerptionTest.java From SWET with MIT License | 5 votes |
@Before public void loadBaseURL() { utils.setDriver(driver); driver.manage().timeouts().pageLoadTimeout(50, TimeUnit.SECONDS) .implicitlyWait(implicitWait, TimeUnit.SECONDS) .setScriptTimeout(30, TimeUnit.SECONDS); utils.setFlexibleWait(flexibleWait); wait = new WebDriverWait(driver, flexibleWait); wait.pollingEvery(pollingInterval, TimeUnit.MILLISECONDS); actions = new Actions(driver); utils.setActions(actions); driver.get(baseURL); }
Example 3
Source File: PageBase.java From SeleniumCucumber with GNU General Public License v3.0 | 5 votes |
public void waitForElement(WebElement element,int timeOutInSeconds) { WebDriverWait wait = new WebDriverWait(driver, timeOutInSeconds); wait.ignoring(NoSuchElementException.class); wait.ignoring(ElementNotVisibleException.class); wait.ignoring(StaleElementReferenceException.class); wait.ignoring(ElementNotFoundException.class); wait.pollingEvery(250,TimeUnit.MILLISECONDS); wait.until(elementLocated(element)); }
Example 4
Source File: WaitHelper.java From SeleniumCucumber with GNU General Public License v3.0 | 5 votes |
private WebDriverWait getWait(int timeOutInSeconds,int pollingEveryInMiliSec) { oLog.debug(""); WebDriverWait wait = new WebDriverWait(driver, timeOutInSeconds); wait.pollingEvery(pollingEveryInMiliSec, TimeUnit.MILLISECONDS); wait.ignoring(NoSuchElementException.class); wait.ignoring(ElementNotVisibleException.class); wait.ignoring(StaleElementReferenceException.class); wait.ignoring(NoSuchFrameException.class); return wait; }