c# - Selenium - 等到元素不可见

标签 c# selenium-webdriver

在下面的代码中,我尝试等待直到元素可见:

var wait = new WebDriverWait(Driver.Instance, TimeSpan.FromSeconds(10));
wait.Until(ExpectedConditions.ElementIsVisible(By.Id("processing")));

是否可以告诉驱动程序等到该元素不可见?

最佳答案

是的,可以使用方法 invisibilityOfElementLocated

wait.until(ExpectedConditions.invisibilityOfElementLocated(locator));

关于c# - Selenium - 等到元素不可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22646031/

相关文章:

c# - 我如何在 Javascript 中处理文件 ByteArray

c# - 如何更改 DataGrid Mahapp 中选定行的颜色

css - Selenium Webdriver XPATH 我可以找到包含某些文本的标签,但我无法在标签标签上方获得输入标签复选框

python - 键盘无法访问元素 <div id ="password"

excel - 等待特定元素加载

java - 与 findElement() 一起使用的最有效选择器是什么?

c# - 使用 CaSTLe ActiveRecord 插入多行并忽略任何重复项的推荐方法

c# - 我如何订购 SOAP 请求 header ?

google-chrome-extension - Selenium WebDriverJS - 测试 Chrome 扩展安装

c# - 通过 Azure Function Bindings 正确使用应用程序和本地设置?