public static IWebDriver SetupTimeout(this IWebDriver webDriver, double ScriptExecuteTimeoutSeconds, double PageLoadTimeoutSeconds) { Contract.Assert(webDriver != null, "The web driver cannot be null."); Contract.Assert(ScriptExecuteTimeoutSeconds >= 0, "The script execute timeout is invalid."); Contract.Assert(PageLoadTimeoutSeconds >= 0, "The page load timeout is invalid."); ITimeouts timeouts = webDriver.Manage().Timeouts(); if (timeouts != null) { timeouts.SetScriptTimeout(TimeSpan.FromSeconds(ScriptExecuteTimeoutSeconds)); timeouts.SetPageLoadTimeout(TimeSpan.FromSeconds(PageLoadTimeoutSeconds)); } return(webDriver); }
public ITimeouts SetPageLoadTimeout(TimeSpan timeToWait) { return(_timeouts.SetPageLoadTimeout(timeToWait).ToWrapper()); }
public TimeoutsInstance SetPageLoadTimeout(int timeToWait) { return(new TimeoutsInstance(this.Engine.Object.InstancePrototype, m_timeouts.SetPageLoadTimeout(TimeSpan.FromMilliseconds(timeToWait)))); }