Closed PandaMagnus closed 5 years ago
So instead of:
return await ConditionalWait.WaitFor<NoSuchElement, StaleElement, IWebElement>(() => Driver.FindElement(by), TimeSpan.FromSeconds(15));
Something like:
return await ConditionalWait.WaitFor(() => Driver.FindElement(by)).SetTimeout(TimeSpan.FromSeconds(15)).IgnoreExceptions(NoSuchElement, StaleElementReference);
No longer needed. For Selenium specific stuff, we can just pass in an anonymous function to a WebDriverWait, and for non-Selenium specific stuff we can use Polly.
So instead of:
return await ConditionalWait.WaitFor<NoSuchElement, StaleElement, IWebElement>(() => Driver.FindElement(by), TimeSpan.FromSeconds(15));
Something like:
return await ConditionalWait.WaitFor(() => Driver.FindElement(by)).SetTimeout(TimeSpan.FromSeconds(15)).IgnoreExceptions(NoSuchElement, StaleElementReference);