Skip to content
CodeKruPro

isEnabled and isDisabled

31/70

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:

  1. Navigate to https://testkru.com/Elements/Buttons
  2. Check if #leftClick is enabled
  3. Check if #disabledButton is enabled
  4. Check if #disabledButton is disabled

Expected output:

leftClick enabled: true
disabledButton enabled: false
disabledButton disabled: true