dimanche 25 janvier 2015

Wait Until is not present, not working in Selenium C#

I am trying to test if a loading spinner is still on the page, so when it disappears I can check the other elements, but if I use something like:



WebDriverWait wait = new WebDriverWait(this.Driver, TimeSpan.FromMinutes(2));
wait.Until(driver => !driver.FindElement(By.CssSelector(css)).Displayed);


It throws NoSuchElementException, I've had similar error when I try to check if element exists, without using ! and also it would throw an error in some other parts of the code. It seems that the Until is not working properly, since it waits 2 minutes to later throw an exception, and the element is just there.


Aucun commentaire:

Enregistrer un commentaire