Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void WaitTillStable(this IWebDriver driver)
- {
- try
- {
- var wait = new WebDriverWait(driver, Config.WaitTimeout);
- wait.Until(d =>
- {
- try
- {
- var stable =
- ((IJavaScriptExecutor)d).ExecuteScript("return window.getAllAngularTestabilities()[0].isStable()");
- return stable != null && (bool)stable;
- }
- catch (Exception e)
- {
- return false;
- }
- });
- }
- catch (Exception e)
- {
- Console.WriteLine(e);
- }
- }
Add Comment
Please, Sign In to add comment