List of usage examples for org.openqa.selenium.support.ui Sleeper SYSTEM_SLEEPER
Sleeper SYSTEM_SLEEPER
To view the source code for org.openqa.selenium.support.ui Sleeper SYSTEM_SLEEPER.
Click Source Link
From source file:br.gov.frameworkdemoiselle.behave.runner.webdriver.ui.primefaces.PrimefacesGrid.java
License:Open Source License
@Override public void tableSelectClick(String value, String l, String c, Element element) { String xpathTabela = preparaXPath(element, l, c); xpathTabela = xpathTabela.concat("//label"); WebElement myElement = (WebElement) ((WebDriver) runner.getDriver()).findElement(By.xpath(xpathTabela)); String selectId = myElement.getAttribute("id"); selectId = selectId.substring(0, selectId.length() - 6); myElement.click();/*from ww w . j a v a2 s.c om*/ try { Sleeper.SYSTEM_SLEEPER.sleep(new Duration(2, TimeUnit.SECONDS)); } catch (InterruptedException e) { e.printStackTrace(); } WebElement myElement2 = (WebElement) ((WebDriver) runner.getDriver()).findElement( By.xpath("//div[@id='" + selectId.toString() + "_panel']/div/ul/li[text()='" + value + "']")); myElement2.click(); }
From source file:com.addthis.hermes.framework.PerformanceTest.java
License:Apache License
private void capture() throws IOException, InterruptedException { long timestamp = System.currentTimeMillis(); Sleeper.SYSTEM_SLEEPER.sleep(new Duration(pageLoadWait, TimeUnit.SECONDS)); List<ResourceTiming> measurements = generateResourceTimingEvents(); NavigationTiming navigationTiming = generateNavigationTimingEvent(); manager.addNavigationTiming(timestamp, navigationTiming); for (ResourceTiming measurement : measurements) { manager.addMeasurement(timestamp, measurement); }//from www .ja va 2 s .com }
From source file:com.jhyhh.appium.AndroidDriverWait.java
License:Apache License
/** * Wait will ignore instances of NotFoundException that are encountered * (thrown) by default in the 'until' condition, and immediately propagate * all others. You can add more to the ignore list by calling * ignoring(exceptions to add).//w w w . ja va 2 s .c om * * @param driver * The WebDriver instance to pass to the expected conditions * @param timeOutInSeconds * The timeout in seconds when an expectation is called * @see AndroidDriverWait#ignoring(java.lang.Class) */ public AndroidDriverWait(AndroidDriver driver, long timeOutInSeconds) { this(driver, new SystemClock(), Sleeper.SYSTEM_SLEEPER, timeOutInSeconds, DEFAULT_SLEEP_TIMEOUT); }
From source file:com.jhyhh.appium.AndroidDriverWait.java
License:Apache License
/** * Wait will ignore instances of NotFoundException that are encountered * (thrown) by default in the 'until' condition, and immediately propagate * all others. You can add more to the ignore list by calling * ignoring(exceptions to add)./*w w w. j av a2 s . c om*/ * * @param driver * The WebDriver instance to pass to the expected conditions * @param timeOutInSeconds * The timeout in seconds when an expectation is called * @param sleepInMillis * The duration in milliseconds to sleep between polls. * @see AndroidDriverWait#ignoring(java.lang.Class) */ public AndroidDriverWait(AndroidDriver driver, long timeOutInSeconds, long sleepInMillis) { this(driver, new SystemClock(), Sleeper.SYSTEM_SLEEPER, timeOutInSeconds, sleepInMillis); }
From source file:com.ma.qa.selenium.IOSDriverWait.java
License:Apache License
/** * Wait will ignore instances of NotFoundException that are encountered (thrown) by default in * the 'until' condition, and immediately propagate all others. You can add more to the ignore * list by calling ignoring(exceptions to add). * * @param driver The WebDriver instance to pass to the expected conditions * @param timeOutInSeconds The timeout in seconds when an expectation is called * @see WebDriverWait#ignoring(java.lang.Class) *//* w ww. jav a 2s. co m*/ public IOSDriverWait(IOSDriver driver, long timeOutInSeconds) { this(driver, new SystemClock(), Sleeper.SYSTEM_SLEEPER, timeOutInSeconds, DEFAULT_SLEEP_TIMEOUT); }
From source file:com.ma.qa.selenium.IOSDriverWait.java
License:Apache License
/** * Wait will ignore instances of NotFoundException that are encountered (thrown) by default in * the 'until' condition, and immediately propagate all others. You can add more to the ignore * list by calling ignoring(exceptions to add). * * @param driver The WebDriver instance to pass to the expected conditions * @param timeOutInSeconds The timeout in seconds when an expectation is called * @param sleepInMillis The duration in milliseconds to sleep between polls. * @see WebDriverWait#ignoring(java.lang.Class) *///from www .j a v a 2s. c o m public IOSDriverWait(IOSDriver driver, long timeOutInSeconds, long sleepInMillis) { this(driver, new SystemClock(), Sleeper.SYSTEM_SLEEPER, timeOutInSeconds, sleepInMillis); }
From source file:com.opera.core.systems.internal.CallbackWait.java
License:Apache License
/** * Callback with a fresh clock and a the system's default thread sleeper. */ public CallbackWait() { this(new SystemClock(), Sleeper.SYSTEM_SLEEPER); }
From source file:com.qmetry.qaf.automation.ui.util.QAFWebDriverWait.java
License:Open Source License
/** * Wait will ignore instances of NotFoundException that are encountered * (thrown) by default in the 'until' condition, and immediately propagate * all others. You can add more to the ignore list by calling * ignoring(exceptions to add).// w w w . j a v a 2 s . c o m * * @param driver * The WebDriver instance to pass to the expected conditions * @param timeOutInMiliSeconds * The timeout in seconds when an expectation is called * @see QAFWebDriverWait#ignoring(Class[]) equals */ public QAFWebDriverWait(QAFExtendedWebDriver driver, long timeOutInMiliSeconds) { this(driver, new SystemClock(), Sleeper.SYSTEM_SLEEPER, timeOutInMiliSeconds, getDefaultInterval()); }
From source file:com.qmetry.qaf.automation.ui.util.QAFWebDriverWait.java
License:Open Source License
/** * Wait will ignore instances of NotFoundException that are encountered * (thrown) by default in the 'until' condition, and immediately propagate * all others. You can add more to the ignore list by calling * ignoring(exceptions to add).//from w w w.j a v a 2 s.c om * * @param driver * The WebDriver instance to pass to the expected conditions * @param timeOutInMiliSeconds * The timeout in seconds when an expectation is called * @param sleepInMillis * The duration in milliseconds to sleep between polls. * @see QAFWebDriverWait#ignoring(Class[]) equals */ public QAFWebDriverWait(QAFExtendedWebDriver driver, long timeOutInMiliSeconds, long sleepInMillis) { this(driver, new SystemClock(), Sleeper.SYSTEM_SLEEPER, timeOutInMiliSeconds, sleepInMillis); }
From source file:com.qmetry.qaf.automation.ui.util.QAFWebElementWait.java
License:Open Source License
/** * Wait will ignore instances of NotFoundException that are encountered * (thrown) by default in the 'until' condition, and immediately propagate * all others. You can add more to the ignore list by calling * ignoring(exceptions to add).//from w w w . ja va2s . co m * * @param element * The WebElement instance to pass to the expected conditions * @param timeOutInMiliSeconds * The timeout in seconds when an expectation is called * @see QAFWebElementWait#ignoring(Class[]) equals */ public QAFWebElementWait(QAFExtendedWebElement element, long timeOutInMiliSeconds) { this(element, new SystemClock(), Sleeper.SYSTEM_SLEEPER, timeOutInMiliSeconds, getDefaultInterval()); }