webdriver icon indicating copy to clipboard operation
webdriver copied to clipboard

Checking if an option is disabled does not consider if itself is disabled

Open PotatoCP opened this issue 4 months ago • 0 comments

based on https://w3c.github.io/webdriver/#dfn-disabled

An element element is disabled if the following steps return true:

  1. If element is an option element or element is an optgroup element:

    1. For each inclusive ancestor ancestor of element:

      1. If ancestor is an optgroup element or ancestor is a select element, and ancestor is actually disabled, return true.
    2. Return false.

  2. Return element is actually disabled.

If element is an option element, we will check its inclusive ancestor that are either optgroup or select element. That means it will not checked if the element itself is disabled (since option is not optgroup nor select element).

PotatoCP avatar Aug 11 '25 06:08 PotatoCP