I was wondering if anyone else has encountered a similar problem like this or has experiences using WebDriverWait?
If they would know why I get a NoSuchElementException which seems to only be thrown in debug mode. I don't get this error being thrown when running the test in normal runtime.
I am able to click continue and step past the exception also.
To change this setting for a particular exception, select the exception, right-click to show the shortcut menu, and select Continue When Unhandled in User Code. You may also change the setting for an entire category of exceptions, such as the entire Common Language Runtime exceptions).
I believe this is a quirk of Visual Studio's debug mode. Essentially in debug mode exceptions are sometimes treated as a break even if it is appropriately handled within a try/catch.
Remember when you pass a func to Until() in WebDriver, that func is executed internally within a try. VS is likely hitting the (handled) exception in that method, which is why you do not see it during normal running.
See here for more info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With