Selenium - Wait until element is NOT visible

后端 未结 10 2179
生来不讨喜
生来不讨喜 2021-02-02 07:29

In the code below, I attempt to wait until an element is visible:

var wait = new WebDriverWait(Driver.Instance, TimeSpan.FromSeconds(10));
wait.Until(ExpectedCon         


        
10条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-02 08:15

    Yes, it's possible with method invisibilityOfElementLocated

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

提交回复
热议问题