课程: Test Automation with Selenium WebDriver for Java

免费学习该课程!

今天就开通帐号,24,700 门业界名师课程任您挑!

Disabled

Disabled

- [Instructor] Web elements are sometimes disabled, meaning, you cannot interact with these elements. Let's look at how WebDriver helps us detect this state. Let's find the element then call the isEnabled method. So we can say boolean isEnabled = driver.findElement, we'll pass in the name, which is "my-disabled", and then we can call the isEnabled method. If isEnabled returns True, then the element is enabled, if not, then the element is disabled and cannot be interacted with.

内容