Created
May 2, 2016 23:20
-
-
Save nadvolod/9249cd30ac71065da2d20242f3683ac0 to your computer and use it in GitHub Desktop.
How to create a fluent wait for IWebDriver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _driver = new FirefoxDriver(); | |
var wait = new DefaultWait<IWebDriver>(_driver) | |
{ | |
Timeout = TimeSpan.FromSeconds(10), | |
Message = "Dude, where's my element?", | |
PollingInterval = TimeSpan.FromSeconds(1) | |
}; | |
wait.IgnoreExceptionTypes(typeof(NoSuchElementException)); | |
var myElement = wait.Until(ElementIsVisible(elementId)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment