コード例 #1
0
  public static void setTimeoutImplicit(WebDriver webDriver, String timeout) {
    WebDriver.Options options = webDriver.manage();

    WebDriver.Timeouts timeouts = options.timeouts();

    timeouts.implicitlyWait(GetterUtil.getInteger(timeout), TimeUnit.MILLISECONDS);
  }
コード例 #2
0
  public static void setTimeoutImplicit(WebDriver webDriver, String timeout) {
    WebDriver.Options options = webDriver.manage();

    WebDriver.Timeouts timeouts = options.timeouts();

    if (!PropsValues.BROWSER_TYPE.equals("safari")) {
      timeouts.implicitlyWait(GetterUtil.getInteger(timeout), TimeUnit.MILLISECONDS);
    }
  }
コード例 #3
0
 @Override
 public void setTimeout(Timeout timeout) {
   WebDriver.Timeouts tm = getDriver().manage().timeouts();
   if (timeout.getWait() != 0) {
     tm.implicitlyWait(timeout.getWait(), TimeUnit.SECONDS);
   }
   if (timeout.getScript() != 0) {
     tm.setScriptTimeout(timeout.getScript(), TimeUnit.SECONDS);
   }
   if (timeout.getLoad() != 0) {
     tm.pageLoadTimeout(timeout.getLoad(), TimeUnit.SECONDS);
   }
 }