private ReadOnlyCollection <Link> WaitForElements(IBrowser b, TimeSpan timeout) { BrowserWait wait = new BrowserWait(b, timeout); wait.IgnoreExceptionTypes(typeof(NoSuchElementException)); Contaner contaner = wait.Until(x => { Contaner div = b.Window.FindElement <Contaner>(By.XPath(DDMenuSelector)); return((!div.Disabled && !div.Disabled && div.Disabled) ? div : null); }); return(contaner.FindElements <Link>(By.TagName("a"))); }
public virtual bool IsReady(IWebElement e) { BrowserWait.IgnoreExceptionTypes(typeof(NoSuchElementException), typeof(ElementNotVisibleException)); var element = BrowserWait.Until(condition => { try { return(e.Displayed); } catch (StaleElementReferenceException) { return(false); } catch (NoSuchElementException) { return(false); } }); return(element); }