Selenium에서 ExplicitWait을 사용할 때 WebDriverTimeoutException을 무시하려고합니다.VB.Net Selenium WebDriverWait.IgnoreExceptionTypes WebDriverTimeoutException을 표시하지 않음
Dim wait As New WebDriverWait(driver, New TimeSpan(0, 0, 10))
wait.IgnoreExceptionTypes(GetType(WebDriverTimeoutException))
wait.Until(ExpectedConditions.InvisibilityOfElementLocated(By.Id("foo")))
NoSuchElementException과 같이 다른 셀렌 예외의 경우에도 정상적으로 작동합니다. 그러나 WebDriverTimeoutExceptions를 사용하면 무시할 수 없습니다.
나는 Try Catch 블록을 사용할 수 있다는 것을 알고 있지만, 이것이 의도 한대로 작동하지 않는 이유가 궁금하다.
Dim wait As New WebDriverWait(driver, New TimeSpan(0, 0, 10))
wait.IgnoreExceptionTypes(GetType(WebDriverTimeoutException))
wait.Until(ExpectedConditions.InvisibilityOfElementLocated(By.Id("foo")))
당신이 효과적으로 element
이 요소가 HTML DOM
에 제시해야 의미 InvisibilityOfElementLocated
로 설정 ExpectedConditions
절 WebDriverWait
유도 : 코드 당으로
원하는 요소가 지정한 10 개 내에 없으면 어떻게해야합니까? 타임 아웃 예외가 발생했습니다. 의도적 인거야. – JeffC