IntelliTect / TestTools

A collection of tools for aiding in test automation
MIT License
10 stars 7 forks source link

Look into more fluent-ish style of syntax for ConditionalWait #23

Closed PandaMagnus closed 5 years ago

PandaMagnus commented 6 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);

PandaMagnus commented 5 years ago

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.