isEnabled and isDisabled
locator.isEnabled() returns true if the element is not disabled. locator.isDisabled() is the inverse.
On the Buttons page:
#leftClick— enabled button#disabledButton— disabled button
Task:
- Navigate to
https://testkru.com/Elements/Buttons - Check if
#leftClickis enabled - Check if
#disabledButtonis enabled - Check if
#disabledButtonis disabled
Expected output:
leftClick enabled: true disabledButton enabled: false disabledButton disabled: true
TestKru