Button enabled or disabled : How does webdriver decide?

前端 未结 2 1170
野性不改
野性不改 2020-12-16 22:26

How does selenium webdriver decide whether a button is enabled or disabled? I have used the isEnabled() method for two buttons - one enabled and the other disabled but i

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-16 22:41

    isEnabled() is a good answer, but it has recently been updated to just Enabled, as a getter on the IWebElement.

    Example:

    Driver.findElement(By.Class("example-class-name")).Enabled

    Cheers!

提交回复
热议问题