From 8f951ba2ea48ecec02ca42475d6b620ee5f67d3c Mon Sep 17 00:00:00 2001 From: Henrik Skupin Date: Fri, 5 Apr 2024 21:44:00 +0200 Subject: [PATCH] Clarify when an element is disabled Selenium's atom "Is Element Enabled" special-cases the disabled state for "option" and "optgroup" elements when the nearest anchestor "select" is disabled as well. --- index.html | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 728a8504..0b750fc8 100644 --- a/index.html +++ b/index.html @@ -4505,8 +4505,8 @@

Elements

Mutable form control elements

Denotes [^input^] elements - that are mutable (e.g. that are not read only or actually disabled) - and whose [^input/type^] attribute + that are mutable (e.g. that are not read only or + disabled) and whose [^input/type^] attribute is in one of the following states:

    @@ -4603,6 +4603,22 @@

    Interactability

  • Return the pair of (x, y). +

    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 [=tree/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=]. +

    +

    An element is in view if it is a member of its own pointer-interactable paint tree, given the pretense that its pointer events are not disabled. @@ -5912,7 +5928,7 @@

    Is Element Enabled

    Otherwise, let enabled to false and jump to the last step of this algorithm. -

  • Set enabled to false if a form control is actually disabled. +

  • Set enabled to false if a form control is disabled.

  • Return success with data enabled. @@ -6099,7 +6115,7 @@

    Element Click

  • Run the focusing steps on parent node. -

  • If element is not actually disabled: +

  • If element is not disabled:

    1. [=fire an event|Fire=] an input event at parent node.