當前位置: 首頁>>代碼示例>>Java>>正文


Java Sleeper.sleepTightInSeconds方法代碼示例

本文整理匯總了Java中org.openqa.selenium.browserlaunchers.Sleeper.sleepTightInSeconds方法的典型用法代碼示例。如果您正苦於以下問題:Java Sleeper.sleepTightInSeconds方法的具體用法?Java Sleeper.sleepTightInSeconds怎麽用?Java Sleeper.sleepTightInSeconds使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.openqa.selenium.browserlaunchers.Sleeper的用法示例。


在下文中一共展示了Sleeper.sleepTightInSeconds方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: switchToNewWindow

import org.openqa.selenium.browserlaunchers.Sleeper; //導入方法依賴的package包/類
/**
 * switch focus of WebDriver to the next found window handle (that's your
 * newly opened window)
 */
public void switchToNewWindow() {
    handledWindowList.add(driver.getWindowHandle());
    Sleeper.sleepTightInSeconds(3);
    for (final String winHandle : driver.getWindowHandles())
        if (!handledWindowList.contains(winHandle)) {
            driver.switchTo().window(winHandle);
            break;
        }
}
 
開發者ID:awltech,項目名稱:easycukes,代碼行數:14,代碼來源:Page.java

示例2: waitLoadingPage

import org.openqa.selenium.browserlaunchers.Sleeper; //導入方法依賴的package包/類
/**
 * @return
 */
public void waitLoadingPage() {
    if (loadProgressBy != null)
        waitUntilElementIsHidden(loadProgressBy);
    if (waitNotificationToHide && notifyBy != null)
        waitUntilElementIsHidden(notifyBy);
    Sleeper.sleepTightInSeconds(1);
}
 
開發者ID:awltech,項目名稱:easycukes,代碼行數:11,代碼來源:Page.java

示例3: updateStatus

import org.openqa.selenium.browserlaunchers.Sleeper; //導入方法依賴的package包/類
@Override
public UpdateStatusPanel updateStatus(String status) {
    Preconditions.checkNotNull(status, "Status parameter is null");
    updateStatusTextArea.clear();
    updateStatusTextArea.sendKeys(status);
    postButton.click();
    int wait = 0;
    while (wait++ <= WAIT_FOR_POST_UPDATE && postButton.isDisplayed()) {
        Sleeper.sleepTightInSeconds(5);
    }
    return this;
}
 
開發者ID:lalit-k,項目名稱:selenium-java-tests,代碼行數:13,代碼來源:UpdateStatusPanelImpl.java

示例4: refresh

import org.openqa.selenium.browserlaunchers.Sleeper; //導入方法依賴的package包/類
/**
 * Allows TODO
 */
public void refresh() {
    driver.navigate().refresh();
    Sleeper.sleepTightInSeconds(2);
    waitLoadingPage();
}
 
開發者ID:awltech,項目名稱:easycukes,代碼行數:9,代碼來源:Page.java

示例5: for

import org.openqa.selenium.browserlaunchers.Sleeper; //導入方法依賴的package包/類
/**
 * Waits for a certain time
 *
 * @param seconds amount of time to wait in seconds
 * @throws Throwable
 */
@When("^wait for (\\d+) seconds$")
public void waitForSomeSeconds(int seconds) throws Throwable {
    log.info("waiting " + seconds + " seconds");
    Sleeper.sleepTightInSeconds(seconds);
}
 
開發者ID:awltech,項目名稱:easycukes,代碼行數:12,代碼來源:SeleniumCommonStepdefs.java

示例6: before

import org.openqa.selenium.browserlaunchers.Sleeper; //導入方法依賴的package包/類
/**
 * Defines the sleeping time to apply for a scenario
 *
 * @param scenario
 */
@Before
public void before(Scenario scenario) {
    Sleeper.sleepTightInSeconds(1);
}
 
開發者ID:awltech,項目名稱:easycukes,代碼行數:10,代碼來源:SeleniumConfigurationStepdefs.java


注:本文中的org.openqa.selenium.browserlaunchers.Sleeper.sleepTightInSeconds方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。