public static void WaitAjax(this IWebDriver driver) { var ready = new Func <bool>(() => (bool)ExecuteJavaScript(driver, "return (typeof($) === 'undefined') ? true : !$.active;")); Contract.Assert(WaitHelper.SpinWait(ready, TimeSpan.FromSeconds(60), TimeSpan.FromMilliseconds(100))); }
public static void WaitReadyState(this IWebDriver driver) { var ready = new Func <bool>(() => (bool)ExecuteJavaScript(driver, "return document.readyState == 'complete'")); Contract.Assert(WaitHelper.SpinWait(ready, TimeSpan.FromSeconds(60), TimeSpan.FromMilliseconds(100))); }