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); }
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); } }
@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); } }