硒 - 等到元素不可见 [英] Selenium - Wait until element is NOT visible
本文介绍了硒 - 等到元素不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在下面的代码中,我试图等到一个元素是可见的:
In the code below, I attempt to wait until an element is visible:
var wait = new WebDriverWait(Driver.Instance, TimeSpan.FromSeconds(10));
wait.Until(ExpectedConditions.ElementIsVisible(By.Id("processing")));
是否可以告诉司机要等到该元素是不可见的?
Is it possible to tell driver to wait until that element is NOT visible?
推荐答案
是的,这可能与方法 invisibilityOfElementLocated
wait.until(ExpectedConditions.invisibilityOfElementLocated(locator));
这篇关于硒 - 等到元素不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文