From 573bb09c4f2b8322fe33265059f730dcee7b4c0a Mon Sep 17 00:00:00 2001 From: Henrik Skupin Date: Fri, 29 Nov 2024 00:13:33 +0000 Subject: [PATCH] Raise "no such window" error in "dispatching actions" when browsing context (navigable) does no longer exist (#1861) SHA: 0ac18fa957652f5efd2dc010d8a285cc08e89891 Reason: push, by pull[bot] Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- index.html | 803 +++++++++++++++++++++++++++-------------------------- 1 file changed, 407 insertions(+), 396 deletions(-) diff --git a/index.html b/index.html index fe21aa99..c1dacd4f 100644 --- a/index.html +++ b/index.html @@ -1,6 +1,6 @@ - + - +

WebDriver

-

W3C Editor's Draft

+

W3C Editor's Draft

More details about this document
@@ -569,11 +569,11 @@

WebDriver

WebIDLinterface mixin NavigatorAutomationInformation {
   readonly attribute boolean webdriver;
 };
-Navigator includes NavigatorAutomationInformation;
+Navigator includes NavigatorAutomationInformation;
Note

The NavigatorAutomationInformation interface -should not be exposed on WorkerNavigator. +should not be exposed on WorkerNavigator.

webdriver @@ -759,7 +759,7 @@

WebDriver

the following steps:

    -
  1. While the connection is not closed:

    +
  2. While the connection is not closed:

    1. Read bytes from the connection until a @@ -777,14 +777,14 @@

      WebDriver

    2. If request match is of type error, send an error with request match's error code - and continue. + and continue.

      Otherwise, let command and URL variables be request match's data.

    3. Let session be null. -

    4. If URL variables contains "session id": +

    5. If URL variables contains "session id":

      Note

      This condition is intended to exclude the New Session and Status commands and any extension commands which do not operate on a particular session. @@ -801,7 +801,7 @@

      WebDriver

    6. If the session is null send an error with error code invalid session id, - then continue. + then continue.

    @@ -989,8 +989,8 @@

    WebDriver

  3. Let command be entry's command. -

  4. Let URL variables be a map with one - entry for each variable defined in URI template, +

  5. Let URL variables be a map with one + entry for each variable defined in URI template, with the entry name equal to the template variable name, and the entry value being the variable value required to expand the URI template to match URL's path. @@ -1457,7 +1457,7 @@

    WebDriver

    400 element click intercepted The Element Click command could not be completed - because the element receiving the events + because the element receiving the events is obscuring the element that was requested clicked. @@ -1602,7 +1602,7 @@

    WebDriver

    404 stale element reference A command failed because - the referenced element is no longer attached to the DOM. + the referenced element is no longer attached to the DOM. @@ -2331,13 +2331,13 @@

    WebDriver

    "browserName" -
    ASCII Lowercase name of the user agent as a string. +
ASCII Lowercase name of the user agent as a string.
"browserVersion"
The user agent version, as a string.
"platformName" -
ASCII Lowercase name of the current platform as a string. +
ASCII Lowercase name of the current platform as a string.
"acceptInsecureCerts"
Boolean initially set to false, @@ -2575,15 +2575,15 @@

WebDriver

to false.

A session has an associated browsing context input -state map, which is a weak map with top-level browsing +state map, which is a weak map with top-level browsing contexts as keys, and input state objects as values. This is initially set to an empty map.

An HTTP session has an associated request queue which is a -queue of requests that are currently awaiting +queue of requests that are currently awaiting processing. -

When a session is created, a set of session configuration +

When a session is created, a set of session configuration flags are provided that define the features of the session. This specification always creates sessions with "http" in session configuration flags, which corresponds to @@ -2724,7 +2724,7 @@

WebDriver

  • Unset the accept insecure TLS flag.

  • Reset the has proxy configuration flag to its default value. -

  • Optionally, close all top-level browsing contexts, +

  • Optionally, close all top-level browsing contexts, without prompting to unload.

  • @@ -2873,11 +2873,11 @@

    WebDriver

  • Set session' current top-level browsing - context to one of the endpoint node's top-level - browsing contexts, preferring the top-level browsing + context to one of the endpoint node's top-level + browsing contexts, preferring the top-level browsing context that has system - focus, or otherwise preferring any top-level browsing + focus, or otherwise preferring any top-level browsing context whose visibility state @@ -2890,7 +2890,7 @@

    WebDriver

    browser instance, eg. by selecting the window that currently has focus. -

  • Set the request queue to a new queue. +

  • Set the request queue to a new queue.

  • Return success with data body.

  • @@ -2981,7 +2981,7 @@

    WebDriver

    9. Timeouts

    -

    A timer is a struct. It has +

    A timer is a struct. It has a timeout fired flag, which is a boolean, initially false. @@ -2991,7 +2991,7 @@

    WebDriver

  • Assert: timeout is not null. -

  • Run the following steps in parallel: +

  • Run the following steps in parallel:

      @@ -3003,15 +3003,15 @@

      WebDriver

    -

    A timeouts configuration is a struct representing +

    A timeouts configuration is a struct representing the timeouts for script evaluation, navigation, and element retrieval. It has a script -timeout item which is an integer or null and is +timeout item which is an integer or null and is initially set to 30,000, a page load -timeout item which is an integer or null and is +timeout item which is an integer or null and is initially set to 300,000, and an implicit -wait timeout item which is an integer or null and is +wait timeout item which is an integer or null and is initially set to 0. @@ -3028,7 +3028,7 @@

    WebDriver

    1. If «"script", "pageLoad", - "implicit"» does not contain key, + "implicit"» does not contain key, then continue.

    2. If value is neither null nor a number greater than @@ -3058,7 +3058,7 @@

      WebDriver

      given timeouts:
        -
      1. Let serialized be an empty map. +

      2. Let serialized be an empty map.

      3. Set serialized["script"] to timeouts' script timeout. @@ -3232,9 +3232,9 @@

        WebDriver

        the point at which the command returns is determined by the session's page loading strategy. The normal state causes it - to return after the load event fires on the new page, + to return after the load event fires on the new page, eager causes it to return - after the DOMContentLoaded event fires, + after the DOMContentLoaded event fires, and none causes it to return immediately.

        Navigation actions are also affected by the value of @@ -3320,7 +3320,7 @@

        WebDriver

      -
    3. Run these steps, but abort when timer's +

    4. Run these steps, but abort when timer's timeout fired flag is set:

        @@ -3340,7 +3340,7 @@

        WebDriver

      -
    5. If aborted return an error with error +

    6. If aborted return an error with error code timeout.

    7. Return success with data null. @@ -3445,7 +3445,7 @@

      WebDriver

    -
  • Run these steps, but abort when timer's +

  • Run these steps, but abort when timer's timeout fired flag is set:

      @@ -3498,7 +3498,7 @@

      WebDriver

  • -
  • If aborted return an error with error +

  • If aborted return an error with error code timeout.

  • Return success with data null. @@ -3584,8 +3584,8 @@

    WebDriver

    for session's current browsing context.

  • If the previous step completed results in - a pageHide event firing, wait - until pageShow event fires + a pageHide event firing, wait + until pageShow event fires or timer' timeout fired flag to be set, whichever occurs first. @@ -3647,7 +3647,7 @@

    WebDriver

    for session's current browsing context.

  • If the previous step completed results in a pageHide - event firing, wait until pageShow event fires or timer' timeout fired flag to be set, whichever occurs first. + event firing, wait until pageShow event fires or timer' timeout fired flag to be set, whichever occurs first.

  • If timer' timeout fired flag is set: @@ -3741,7 +3741,7 @@

    WebDriver

  • Let title be the session's current top-level browsing - context's active document's title. + context's active document's title.

  • Return success with data title.

  • @@ -3756,19 +3756,19 @@

    WebDriver

    top-level browsing context. session's current top-level browsing context is represented in the protocol by its associated window handle. - When a top-level browsing context is selected using + When a top-level browsing context is selected using the Switch To Window command, a specific browsing context can be selected using the Switch to Frame command.

    Note

    The use of the term “window” to - refer to a top-level browsing context + refer to a top-level browsing context is legacy and doesn't correspond with either the operating system notion of a “window” or the DOM Window object.

    A browsing context is said to be no longer open - if its navigable has been destroyed. + if its navigable has been destroyed.

    Each browsing context has an associated window handle which uniquely @@ -3776,7 +3776,7 @@

    WebDriver

    "current".

    A web frame - is an abstraction used to identify a frame or iframe + is an abstraction used to identify a frame or iframe when it is transported via the protocol, between remote and local ends. @@ -3804,7 +3804,7 @@

    WebDriver

    1. Let identifier be the web window identifier if the associated browsing context of window - is a top-level browsing context. + is a top-level browsing context.

      Otherwise let it be the web frame identifier. @@ -3833,7 +3833,7 @@

      WebDriver

      window handle is reference, or null if no such browsing context exists. -

    2. If browsing context is null or a top-level browsing context, +

    3. If browsing context is null or a top-level browsing context, return error with error code no such frame.

    4. Return success with data browsing context's associated window. @@ -3857,7 +3857,7 @@

      WebDriver

      window handle is reference, or null if no such browsing context exists. -

    5. If browsing context is null or not a top-level browsing context, +

    6. If browsing context is null or not a top-level browsing context, return error with error code no such window.

    7. Return success with data browsing context's associated window. @@ -3882,7 +3882,7 @@

      WebDriver

      implementation must:

        -
      1. Assert: context is a top-level browsing context. +

      2. Assert: context is a top-level browsing context.

      3. Set session's current top-level browsing context to context. @@ -3995,7 +3995,7 @@

        WebDriver

      4. Close session's current top-level browsing context. -

      5. If there are no more open top-level browsing contexts, +

      6. If there are no more open top-level browsing contexts, then try to close the session.

      7. Return the result of running the remote end steps for @@ -4037,11 +4037,11 @@

        WebDriver

        return error with error code invalid argument.

      8. If there is an active user prompt, that prevents the - focusing of another top-level browsing context, + focusing of another top-level browsing context, return error with error code unexpected alert open.

      9. If handle is equal to the associated window - handle for some top-level browsing context, + handle for some top-level browsing context, let context be the that browsing context, and set the current top-level browsing context with session and context. @@ -4121,7 +4121,7 @@

        WebDriver

        1. Let handles be a List. -

        2. For each top-level browsing context in the remote end, +

        3. For each top-level browsing context in the remote end, push the associated window handle onto handles.

        4. Return success with data handles. @@ -4194,7 +4194,7 @@

          WebDriver

          -

          Create a new top-level browsing context. +

          Create a new top-level browsing context.

          The remote end steps, given session, URL variables and parameters are: @@ -4214,7 +4214,7 @@

          WebDriver

        5. Let type hint be the result of getting the property "type" from parameters. -

        6. Create a new top-level browsing context by running +

        7. Create a new top-level browsing context by running the window open steps with URL set to "about:blank", target set to the empty string, and features set to "noopener" and @@ -4348,12 +4348,12 @@

          WebDriver

          of trying to get a known element with session and id. -

        8. If element is not a frame - or iframe element, +

        9. If element is not a frame + or iframe element, return error with error code no such frame.

        10. Set the current browsing context - with session and element's content navigable's active browsing context. + with session and element's content navigable's active browsing context.

        @@ -4392,7 +4392,7 @@

        WebDriver

        1. If session's current browsing context is already the - top-level browsing context: + top-level browsing context:

            @@ -4437,7 +4437,7 @@

            WebDriver

            Where a command is not supported, an unsupported operation error is returned. -

            The top-level browsing context +

            The top-level browsing context has an associated window state which describes what visibility state its OS widget window is in. It can be in one of the following states: @@ -4479,7 +4479,7 @@

            WebDriver

            -

            If for whatever reason the top-level browsing context's +

            If for whatever reason the top-level browsing context's OS window cannot enter either of the window states, or if this concept is not applicable on the current system, the default state must be normal. @@ -4504,7 +4504,7 @@

            WebDriver

            To maximize the window, given an operating system level window - with an associated top-level browsing context, + with an associated top-level browsing context, run the implementation-specific steps to transition the operating system level window into the maximized window state. @@ -4519,25 +4519,25 @@

            WebDriver

            To iconify the window, given an operating system level window - with an associated top-level browsing context, + with an associated top-level browsing context, run implementation-specific steps to transition the operating system level window into the minimized window state. Do not return from this operation until the visibility state - of the top-level browsing context's active document + of the top-level browsing context's active document has reached the hidden state, or until the operation times out.

            To restore the window, given an operating system level window - with an associated top-level browsing context, + with an associated top-level browsing context, run implementation-specific steps to restore or unhide the window to the visible screen. Do not return from this operation until the visibility state - of the top-level browsing context's active document + of the top-level browsing context's active document has reached the visible state, or until the operation times out. @@ -4941,7 +4941,7 @@

            WebDriver

          1. Call fullscreen an element with session's current top-level browsing context's - active document's document element. + active document's document element.

            Note

            The window is now in the Fullscreen window state. @@ -4958,7 +4958,7 @@

            WebDriver

            A web element - is an abstraction used to identify an element + is an abstraction used to identify an element when it is transported via the protocol, between remote and local ends. @@ -4972,7 +4972,7 @@

            WebDriver

            representing a handle to a DOM node in a specific WebDriver session. -

            A weak map is a map in which keys are held +

            A weak map is a map in which keys are held weakly i.e. items are removed if the key object is garbaged collected, and presence in the map does not prevent garbage collection. This acts as an alternative to defining properties directly on the key objects. @@ -4989,7 +4989,7 @@

            WebDriver

            corresponding WebDriver node id.

            A WebDriver session has a navigable seen nodes map -which is a weak map between a navigable and a set. +which is a weak map between a navigable and a set.

            To get a node given session, browsing context, and reference: @@ -5037,7 +5037,7 @@

            WebDriver

          2. Set node id map[node] to node id.
          3. Let navigable be browsing - context's active document's node navigable. + context's active document's node navigable.
          4. Let navigable seen nodes map be session's navigable seen nodes map. @@ -5056,14 +5056,14 @@

            WebDriver

            context, and reference if the following steps return true:

            1. Let navigable be browsing - context's active document's node navigable. + context's active document's node navigable.
            2. Let navigable seen nodes map be session's navigable seen nodes map.
            3. If navigable seen nodes map - contains navigable and navigable seen nodes - map[navigable] contains reference, + contains navigable and navigable seen nodes + map[navigable] contains reference, return true, otherwise return false.
            @@ -5080,7 +5080,7 @@

            WebDriver

            context, and reference.
          5. If node is not null and node does not implement - Element return error with error code no such element. + Element return error with error code no such element. @@ -5091,10 +5091,10 @@

            WebDriver

          To get or create a web element reference - given session and element: + given session and element:

            -
          1. Assert: element implements Element. +
          2. Assert: element implements Element.
          3. Return the result of trying to get or create a node reference @@ -5134,12 +5134,12 @@

            WebDriver

          4. Return success with data element.

          -

          An element is stale - if its node document is not the active document - or if it is not connected. +

          An element is stale + if its node document is not the active document + or if it is not connected.

          To scroll into view - an element + an element perform the following steps only if the element is not already in view: @@ -5159,7 +5159,7 @@

          WebDriver

          with element as the this value.

        -

        Editable elements +

        Editable elements are those that can be used for typing and clearing, and they fall into two subcategories: @@ -5168,7 +5168,7 @@

        WebDriver

        Mutable form control elements

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

        -

        And the textarea element. +

        And the textarea element.

        Mutable elements

        Denotes elements that are editing hosts or content editable.

        -

        An element is said to have +

        An element is said to have pointer events disabled if the resolved value of its "pointer-events" style property is "none". -

        An element is to be considered read only +

        An element is to be considered read only if it is an input element - whose readonly attribute is set. + whose readonly attribute is set.

        12.1 Interactability

        -

        In order to determine if an element +

        In order to determine if an element can be interacted with using pointer actions, WebDriver performs hit-testing to find if the interaction will be able to reach the requested element.

        An interactable element - is an element which is either + is an element which is either pointer-interactable or keyboard-interactable.

        A pointer-interactable element - is defined to be the first element, + is defined to be the first element, defined by the paint order found at the center point of its rectangle that is inside the viewport, excluding the size of any rendered scrollbars.

        A keyboard-interactable element - is any element that has a focusable area, + is any element that has a focusable area, is a body element, - or is the document element. + or is the document element. -

        An element's in-view center point +

        An element's in-view center point is the origin position of the rectangle that is the intersection between - the element's first DOMRect of getClientRects() + the element's first DOMRect of getClientRects() and the initial viewport. - Given an element that is known to be in view, + Given an element that is known to be in view, it can be calculated this way:

        1. Let rectangle be - the first element of the DOMRect sequence - returned by calling getClientRects() on element. + the first element of the DOMRect sequence + returned by calling getClientRects() on element.

        2. Let left be max(0, min(x coordinate, @@ -5265,15 +5265,15 @@

          WebDriver

        3. Return the pair of (x, y).

        -

        An element element is disabled if the following steps +

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

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

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

            -
          1. For each inclusive ancestor ancestor of element: +

          2. For each inclusive ancestor ancestor of element:

              -
            1. If ancestor is an optgroup element or ancestor is a select +

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

          3. Return false. @@ -5281,26 +5281,26 @@

            WebDriver

          4. Return element is actually disabled.

          -

          An element is in view +

          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. -

          An element is obscured +

          An element is obscured if the pointer-interactable paint tree at its center point is empty, or the first element in this tree - is not an inclusive descendant of itself. + is not an inclusive descendant of itself.

          -

          An element's +

          An element's pointer-interactable paint tree is produced this way: @@ -5343,8 +5343,8 @@

          WebDriver

          active document, return an empty sequence.

        3. Let rectangles be - the DOMRect sequence - returned by calling getClientRects(). + the DOMRect sequence + returned by calling getClientRects().

        4. If rectangles has the length of 0, @@ -5385,7 +5385,7 @@

          WebDriver

          context, and reference.
        5. If node is not null and node does not implement - ShadowRoot return error with error code + ShadowRoot return error with error code no such shadow root. @@ -5400,7 +5400,7 @@

          WebDriver

          given session and shadow root:

            -
          1. Assert: element implements ShadowRoot. +
          2. Assert: element implements ShadowRoot.
          3. Return the result of trying to get or create a node reference @@ -5441,7 +5441,7 @@

            WebDriver

          A shadow root is detached - if its node document is not the active document + if its node document is not the active document or if the element node referred to as its host is stale.

        @@ -5512,7 +5512,7 @@

        WebDriver

        An element location strategy is an enumerated attribute deciding what technique should be used - to search for elements in session's current + to search for elements in session's current browsing context. The following table of location strategies lists the keywords and states defined for this attribute: @@ -5558,7 +5558,7 @@

        WebDriver

        1. Let elements be the result of calling - querySelectorAll() with start node as this + querySelectorAll() with start node as this and selector as the argument. If this causes an exception to be thrown, return error with error code invalid selector. @@ -5576,11 +5576,11 @@

          WebDriver

          1. Let elements be the result of calling - querySelectorAll() with start node as this + querySelectorAll() with start node as this and "a" as the argument. If this throws an exception, return error with error code unknown error. -

          2. Let result be an empty NodeList. +

          3. Let result be an empty NodeList.

          4. For each element in elements: @@ -5608,7 +5608,7 @@

            WebDriver

            is very similar to the Link Text strategy, but rather than matching the entire string, only a substring needs to match. - That is, return all a elements + That is, return all a elements with rendered text that contains the selector expression.

            To find a web element @@ -5617,11 +5617,11 @@

            WebDriver

            1. Let elements be the result of calling - querySelectorAll() with start node as this + querySelectorAll() with start node as this and "a" as the argument. If this throws an exception, return error with error code unknown error. -

            2. Let result be an empty NodeList. +

            3. Let result be an empty NodeList.

            4. For each element in elements: @@ -5643,7 +5643,7 @@

              WebDriver

              To find a web element with the Tag Name strategy return success with data set to the result of - calling getElementsByTagName() with + calling getElementsByTagName() with start node as this and selector as the argument. @@ -5677,7 +5677,7 @@

              WebDriver

              exception return error with error code unknown error. -

            5. Let result be an empty NodeList. +

            6. Let result be an empty NodeList.

            7. Repeat, while index is less than length: @@ -5686,7 +5686,7 @@

              WebDriver

              evaluateResult as this and index as the argument. -
            8. If node is not an element return an error +

            9. If node is not an element return an error with error code invalid selector.

            10. Append node to result. @@ -5717,7 +5717,7 @@

              WebDriver

              Note
            11. Let start node be - session's current browsing context's document element. + session's current browsing context's document element.

            12. If start node is null, return error with error code no such element. @@ -5811,7 +5811,7 @@

              WebDriver

              with session.

            13. Let start node be - session's current browsing context's document + session's current browsing context's document element.

            14. If start node is null, @@ -6045,9 +6045,9 @@

              WebDriver

            15. Let active element be the active element of session's current browsing - context's document element. + context's document element. -

            16. If active element is a non-null element, +

            17. If active element is a non-null element, return success with data set to web element reference object for session and active element. @@ -6105,7 +6105,7 @@

              WebDriver

              1. Let rect be the value - returned by calling getBoundingClientRect(). + returned by calling getBoundingClientRect().

              2. Let window be the associated window of session's current top-level browsing context. @@ -6121,37 +6121,37 @@

                WebDriver

              3. Return a pair of (x, y).

              -

              To determine if node is not in the same tree - as another node, other, +

              To determine if node is not in the same tree + as another node, other, run the following substeps:

                -
              1. If the node's node document - is not other's node document, +

              2. If the node's node document + is not other's node document, return true. -

              3. Return true if the result of calling the node's - compareDocumentPosition() with other as argument - is DOCUMENT_POSITION_DISCONNECTED (1), +

              4. Return true if the result of calling the node's + compareDocumentPosition() with other as argument + is DOCUMENT_POSITION_DISCONNECTED (1), otherwise return false.

              -

              An element's container is: +

              An element's container is:

              -
              option element in a valid element context -
              optgroup element in a valid element context -

              The element's element context, +

              option element in a valid element context +
              optgroup element in a valid element context +

              The element's element context, which is determined by:

              1. Let datalist parent be - the first datalist element reached + the first datalist element reached by traversing the tree in reverse order from element, or undefined if the root of the tree is reached.

              2. Let select parent be the - first select element reached + first select element reached by traversing the tree in reverse order from element, or undefined if the root of the tree is reached. @@ -6160,11 +6160,11 @@

                WebDriver

                Otherwise, the element context is datalist parent.

              -
              option element in an invalid element context +
              option element in an invalid element context

              The element does not have a container.

              Otherwise -

              The container is the element itself. +

              The container is the element itself.

              12.4.1 Is Element Selected

              @@ -6183,10 +6183,10 @@

              WebDriver

              Note

              The Is Element Selected command -determines if the referenced element is selected or not. +determines if the referenced element is selected or not. This operation only makes sense on input elements of the Checkbox- and Radio Button states, -or on option elements. +or on option elements.

              The remote end steps, given session, URL variables and parameters are: @@ -6208,12 +6208,12 @@

              WebDriver

              element is an input element - with a type attribute + with a type attribute in the Checkbox- or Radio Button state

              The result of element's checkedness.

              element is - an option element + an option element

              The result of element's selectedness.

              Otherwise @@ -6303,11 +6303,11 @@

              WebDriver

              If name is a boolean attribute

              "true" (string) - if the element hasAttribute() with name, + if the element hasAttribute() with name, otherwise null.

              Otherwise -

              The result of getting an attribute by name +

              The result of getting an attribute by name name.

              @@ -6315,7 +6315,7 @@

              WebDriver

            Note

            Please note that the behavior of this command - deviates from the behavior of getAttribute() in [DOM], + deviates from the behavior of getAttribute() in [DOM], which in the case of a set boolean attribute would return an empty string. The reason this command returns true as a string @@ -6439,7 +6439,7 @@

            WebDriver

          5. Let computed value be the result of the first matching condition:

            session's current browsing context's - active document's type is not "xml" + active document's type is not "xml"
            computed value of parameter URL variables["property name"] from element's style declarations. @@ -6469,9 +6469,9 @@

            WebDriver

            Note
          6. Let qualified name be the result of getting - element's tagName IDL attribute. + element's tagName IDL attribute.

          7. Return success with data qualified name.

          @@ -6619,13 +6619,13 @@

          WebDriver

          X axis position of the top-left corner of the web element relative to session's current browsing context's -document element in CSS pixels. +document element in CSS pixels.
          "y"
          Y axis position of the top-left corner of the web element relative to session's current browsing context's -document element in CSS pixels. +document element in CSS pixels.
          "height"
          @@ -6711,7 +6711,7 @@

          WebDriver

        2. Let enabled be a boolean initially set to true if session's current browsing context's - active document's type is not + active document's type is not "xml".

          Otherwise, let enabled to false @@ -6798,7 +6798,7 @@

          WebDriver

          12.5 Interaction

          -

          The element interaction commands +

          The element interaction commands provide a high-level instruction set for manipulating form controls. Unlike Actions, they will implicitly scroll elements into view @@ -6820,15 +6820,15 @@

          WebDriver

          if the element has a checked content attribute and false if it does not, empty the list of selected files, and then invoke the value sanitization algorithm - iff the type attribute's current state defines one. + iff the type attribute's current state defines one. -

          The clear algorithm for textarea elements +

          The clear algorithm for textarea elements is to set the dirty value flag back to false, and set the raw value of element to an empty string. -

          The clear algorithm for output elements +

          The clear algorithm for output elements is set the element's value mode flag to default - and then to set the element's textContent IDL attribute + and then to set the element's textContent IDL attribute to an empty string (thus clearing the element's child nodes).

          12.5.1 Element Click

          @@ -6848,7 +6848,7 @@

          WebDriver

          Note
        3. If element's container - is obscured by another element, + is obscured by another element, return error with error code element click intercepted.

        4. Matching on element:

          -
          option element +
          option element
          1. Let parent node be the element's container. -

          2. Fire a mouseOver event at parent node. +

          3. Fire a mouseOver event at parent node. -

          4. Fire a mouseMove event at parent node. +

          5. Fire a mouseMove event at parent node. -

          6. Fire a mouseDown event at parent node. +

          7. Fire a mouseDown event at parent node.

          8. Run the focusing steps on parent node.

          9. If element is not disabled:

              -
            1. Fire an input event at parent node. +

            2. Fire an input event at parent node.

            3. Let previous selectedness be equal to element selectedness. @@ -6921,13 +6921,13 @@

              WebDriver

              set the element's selectedness state to true.

            4. If previous selectedness is false, - fire a change event + fire a change event at parent node.

            -
          10. Fire a mouseUp event at parent node. +

          11. Fire a mouseUp event at parent node. -

          12. Fire a click event at parent node. +

          13. Fire a click event at parent node.

          Otherwise @@ -7055,7 +7055,7 @@

          WebDriver

          element is an input element - whose type attribute is in the File Upload state + whose type attribute is in the File Upload state
          True if the list of selected files has a length of 0, and false otherwise. @@ -7148,15 +7148,15 @@

          WebDriver

          Note

          The Element Send Keys command -scrolls into view the form control element -and then sends the provided keys to the element. -In case the element is not keyboard-interactable, +scrolls into view the form control element +and then sends the provided keys to the element. +In case the element is not keyboard-interactable, an element not interactable error is returned.

          A non-typeable form control is an input element -whose type attribute state +whose type attribute state causes the primary input mechanism not to be through means of a keyboard, whether virtual or physical. @@ -7174,7 +7174,7 @@

          WebDriver

          Other examples of non-typeable form controls include form controls interacted with via system-native widgets, -such as a scrolled option list for select elements +such as a scrolled option list for select elements and a number keypad for input elements in the number state on non-desktop devices.

          @@ -7480,7 +7480,7 @@

          WebDriver

          return an error with error code invalid argument.

        5. Let multiple equal the result - of calling hasAttribute() with "multiple" + of calling hasAttribute() with "multiple" on element.

        6. if multiple is false and the @@ -7497,7 +7497,7 @@

          WebDriver

          If multiple is true files are be appended to element's selected files. -

        7. Fire these events in order on element: +

        8. Fire these events in order on element:

          1. input
          2. change @@ -7507,7 +7507,7 @@

            WebDriver

          -
          element is a non-typeable form control +
          element is a non-typeable form control
          1. If element does not have an own property @@ -7529,15 +7529,15 @@

            WebDriver

          -
          element is content editable -
          If element does not currently have focus, +
          element is content editable +
          If element does not currently have focus, set the text insertion caret after any child content.
          Otherwise
          1. If element does not currently have focus, let current text length be the - length of element's API value. + length of element's API value.

          2. Set the text insertion caret using set selection range using current text length for both the start @@ -7609,7 +7609,7 @@

            WebDriver

          3. Let source be the result of invoking the fragment serializing algorithm on a fictional node whose only - child is the document element providing true for the + child is the document element providing true for the require well-formed flag. If this causes an exception to be thrown, let source be null. @@ -7633,13 +7633,13 @@

            WebDriver

            To JSON deserialize @@ -7706,7 +7706,7 @@

            WebDriver

            type String

            Return success with data value. -

            instance of Element +

          instance of Element

          If the element is stale, return error with error code stale element reference. @@ -7718,7 +7718,7 @@

          WebDriver

        9. Return success with data reference.

        -
        instance of ShadowRoot +
        instance of ShadowRoot

        If the shadow root is detached, return error with error code detached shadow root. @@ -7840,7 +7840,7 @@

        WebDriver

        If at any point during the algorithm a user prompt appears, immediately return Completion { [[Type]]: normal, [[Value]]: null, - [[Target]]: empty }, but continue to run the other steps of this algorithm in parallel. + [[Target]]: empty }, but continue to run the other steps of this algorithm in parallel.

        1. Let window be the associated window @@ -7848,7 +7848,7 @@

          WebDriver

          document.

        2. Let environment settings be - window's relevant settings object. + window's relevant settings object.

        3. Let global scope be environment settings realm's @@ -7864,9 +7864,9 @@

          WebDriver

          then let strict be true, otherwise let strict be false. -

        4. Prepare to run script with environment settings. +

        5. Prepare to run script with environment settings. -

        6. Prepare to run a callback with environment settings. +

        7. Prepare to run a callback with environment settings.

        8. Let function be the result of calling FunctionCreate, with arguments: @@ -7892,10 +7892,10 @@

          WebDriver

          Function.[[Call]](window, parameters) with function as the this value. -

        9. Clean up after running a callback +

        10. Clean up after running a callback with environment settings. -

        11. Clean up after running script +

        12. Clean up after running script with environment settings.

        13. Return completion. @@ -7946,19 +7946,19 @@

          WebDriver

          and timeout.

        -
      10. Let promise be a new Promise. +

      11. Let promise be a new Promise. -

      12. Run the following substeps in parallel: +

      13. Run the following substeps in parallel:

        1. Let scriptPromise be the result of promise-calling execute a function body, with arguments body and arguments.

        2. Upon fulfillment of scriptPromise with value v, - resolve promise with value v. + resolve promise with value v.

        3. Upon rejection of scriptPromise with value r, - reject promise with value r. + reject promise with value r.

      14. Wait until promise is resolved, @@ -8030,9 +8030,9 @@

        WebDriver

        and timeout.

      -
    8. Let promise be a new Promise. +

    9. Let promise be a new Promise. -

    10. Run the following substeps in parallel: +

    11. Run the following substeps in parallel:

      1. Let resolvingFunctions be CreateResolvingFunctions(promise). @@ -8043,7 +8043,7 @@

        WebDriver

        execute a function body, with arguments body and arguments. -

      2. If scriptResult.[[Type]] is not normal, then reject +

      3. If scriptResult.[[Type]] is not normal, then reject promise with value scriptResult.[[Value]], and abort these steps.

        Note

        Prior revisions of this specification did not recognize the @@ -8056,7 +8056,7 @@

        WebDriver

      4. Let then be Get(scriptResult.[[Value]], "then"). -

      5. If then.[[Type]] is not normal, then reject +

      6. If then.[[Type]] is not normal, then reject promise with value then.[[Value]], and abort these steps.

      7. If IsCallable(then.[[Type]]) is false, @@ -8066,10 +8066,10 @@

        WebDriver

        scriptResult.[[Value]]).

      8. Upon fulfillment of scriptPromise with value v, - resolve promise with value v. + resolve promise with value v.

      9. Upon rejection of scriptPromise with value r, - reject promise with value r. + reject promise with value r.

    12. Wait until promise is resolved, @@ -8221,12 +8221,12 @@

      WebDriver

      and the associated field's value from the cookie store. The optional fields may be omitted. -

      To get all associated cookies to a document, +

      To get all associated cookies to a document, the user agent must return the enumerated set of cookies that meet the requirements set out in the first step of the algorithm in [RFC6265] to compute cookie-string for an ‘HTTP API', from the cookie store of the - given document's address. The returned cookies must + given document's address. The returned cookies must include HttpOnly cookies.

      When the remote end is instructed @@ -8368,7 +8368,7 @@

      WebDriver

      with session.

    13. If session's current browsing - context's document element is + context's document element is a cookie-averse Document object, return error with error code invalid cookie domain. @@ -8383,7 +8383,7 @@

      WebDriver

    14. Create a cookie in the cookie store associated with - the active document's address + the active document's address using cookie name name, cookie value value, and an attribute-value list of the following cookie concepts @@ -8577,7 +8577,7 @@

      WebDriver

      Configuration of actions dispatch is controlled by a -actions options object. This is a struct that has a +actions options object. This is a struct that has a fields named is element origin, which is a set of steps that validate if a protocol object represents an element origin, and get element origin, which is a set of steps @@ -8603,7 +8603,7 @@

      WebDriver

      An input source is a virtual device providing input - events. Each input source is represented by an struct specific to + events. Each input source is represented by an struct specific to the type of the input source. Each input source has an input id which is stored as a key in the input state map. @@ -8858,7 +8858,7 @@

      WebDriver

      objects. This list is used to manage dispatching events when resetting the state of the input source -

    15. An actions queue which is a queue that ensures +

    16. An actions queue which is a queue that ensures that access to the input state is serialized.

    17. @@ -8867,14 +8867,14 @@

      WebDriver

      and browsing context:

        -
      1. Assert: browsing context is a top-level browsing +

      2. Assert: browsing context is a top-level browsing context.

      3. Let input state map be session's browsing context input state map.

      4. If input state map does not - contain browsing context, set input + contain browsing context, set input state map[browsing context] to create an input state. @@ -8886,14 +8886,14 @@

        WebDriver

        and browsing context:

          -
        1. Assert: browsing context is a top-level browsing +

        2. Assert: browsing context is a top-level browsing context.

        3. Let input state map be session's browsing context input state map.

        4. If input state map[browsing context] - exists, then remove input state map[browsing + exists, then remove input state map[browsing context].

        @@ -8964,7 +8964,7 @@

        WebDriver

      5. Return success with data source.

      -

      A global key state is a struct with items pressed, +

      A global key state is a struct with items pressed, altKey, ctrlKey, metaKey, and shiftKey.

      To get the global key state given input state: @@ -8973,7 +8973,7 @@

      WebDriver

    18. Let input state map be input state's input state map. -

    19. Let sources be the result of getting the values with input state map. +

    20. Let sources be the result of getting the values with input state map.

    21. Let key state be a new global key state with pressed set to an empty @@ -9014,7 +9014,7 @@

      WebDriver

    22. Let pointer ids be an empty set. -
    23. Let sources be the result of getting the values with input state's input state map. +

    24. Let sources be the result of getting the values with input state's input state map.

    25. For each source in sources.:

        @@ -9036,7 +9036,7 @@

        WebDriver

        which actions can be performed. During a tick, each input source has an assigned action — possibly a noop pause action — which may result in changes to the user agent internal state and eventually - cause DOM events to be fired at the page. The next tick begins + cause DOM events to be fired at the page. The next tick begins after the user agent has had a chance to process all DOM events generated in the current tick. @@ -9066,7 +9066,7 @@

        WebDriver

        action of the input source may cause additional events to be generated depending on the implementation and the state of the browser (e.g. input events relating to key actions when the focus is - on an editable element, scroll events, etc.). + on an editable element, scroll events, etc.).

        @@ -9075,7 +9075,7 @@

        WebDriver

        An activation trigger generated by WebDriver needs to be indistinguishable from those generated by a real user interacting with the browser. In particular, the dispatched events -will have the isTrusted attribute set to true. +will have the isTrusted attribute set to true.

        The most robust way to dispatch these events is by creating them in @@ -9928,7 +9928,10 @@

        WebDriver

        actions by tick:

          -
        1. Let tick duration be the result of computing +

        2. If browsing context is no longer open, return + error with error code no such window. + +
        3. Let tick duration be the result of computing the tick duration with argument tick actions.

        4. Try to dispatch tick actions with @@ -9999,7 +10002,7 @@

          WebDriver

        5. Let source be the result of get an input source given input state and input id. -

        6. Assert: source is not undefined. +

        7. Assert: source is not undefined.

        8. Let global key state be the result of get the global key state with input state. @@ -10665,12 +10668,12 @@

          WebDriver

          options.

        9. If x is less than 0 or greater than the width of - the viewport in CSS pixels, then return error with + the viewport in CSS pixels, then return error with error code move target out of bounds.

        10. If y is less than 0 or greater than the height of the viewport in CSS pixels, then - return error with error code move target out of + return error with error code move target out of bounds.

        11. Let duration be equal to @@ -10801,7 +10804,7 @@

          WebDriver

        12. If last is true, return. -

        13. Run the following substeps in parallel: +

        14. Run the following substeps in parallel:

          Note
        15. If x is less than 0 or greater than the width of the viewport in CSS pixels, then - return error with error code move target out of + return error with error code move target out of bounds.

        16. If y is less than 0 or greater than the height of the viewport in CSS pixels, then - return error with error code move target out of + return error with error code move target out of bounds.

        17. Let delta x be equal to the deltaX @@ -10968,7 +10971,7 @@

          WebDriver

        18. If last is true, return. -

        19. Run the following substeps in parallel: +

        20. Run the following substeps in parallel:

          Note
        21. If session's current browsing context - is no longer open, return error with error - code no such window. + is no longer open, return error with error + code no such window.

        22. Try to handle any user prompts with session.

        23. Dispatch actions with input state, actions by tick, current browsing context, - and actions options. If this results in an error + and actions options. If this results in an error return that error.

        24. Return success with data null. @@ -11072,7 +11075,7 @@

          WebDriver

          The Release Actions command is used to release all the keys and pointer buttons that are currently depressed. -This causes events to be fired +This causes events to be fired as if the state was released by an explicit series of actions. It also clears all the internal state of the virtual devices. @@ -11081,8 +11084,8 @@

          WebDriver

          1. If session's current browsing context - is no longer open, return error with error - code no such window. + is no longer open, return error with error + code no such window.

          2. Let input state be the result of get the input state with session and current @@ -11125,10 +11128,10 @@

            WebDriver

            When a user prompt appears, it is the task of the subsequent command to handle it. If the subsequent requested command is not one listed in this chapter, - an unexpected alert open error will be returned. + an unexpected alert open error will be returned.

            Whenever active sessions is a list containing exactly one -item, and that item is a HTTP session, but is not a BiDi +item, and that item is a HTTP session, but is not a BiDi session, then in the steps to fire beforeunload, implementations must act as if showing an unload prompt is likely to be annoying, deceptive, or pointless. @@ -11144,14 +11147,14 @@

            WebDriver

            1. Let agent be browsing context's active - document's relevant agent. + document's relevant agent.

            2. If agent's event loop is not - currently paused, return null. + currently paused, return null.

            3. Return the user prompt which handles the input required to meet the condition passed when event loop - was paused. + was paused.

            The current user prompt is the result of get the @@ -11169,10 +11172,10 @@

            WebDriver

            A remote end has a user prompt handler which defines how a WebDriver session will react when a user prompt is -displayed. It is either null or a map between strings +displayed. It is either null or a map between strings and prompt handler configuration values. Initially it is null. -

            A prompt handler configuration is a struct with two +

            A prompt handler configuration is a struct with two items; a handler, which is a string, and a notify, which is a boolean. @@ -11186,7 +11189,7 @@

            WebDriver

            be configuration's handler.

          3. If «"dismiss", "accept"» - contains serialized, + contains serialized, and configuration's notify is true, append " and notify" to serialized. @@ -11236,8 +11239,8 @@

            WebDriver

            Note

            The "default" type represents a fallback when no specific handler is defined for a given prompt type, including the "beforeUnload" prompt type. It can only be set if the -unhandled prompt behavior is a map which -contains "default". For HTTP-only sessions setting +unhandled prompt behavior is a map which +contains "default". For HTTP-only sessions setting unhandled prompt behavior as a string value, the value will be assigned to the internal type "fallbackDefault". The "fallbackDefault" value is not used for the @@ -11258,8 +11261,8 @@

            WebDriver

            with value.

          4. If value is not a string, an implementation that - does not also support [WebDriver-BiDi] may return error - with error code invalid argument. + does not also support [WebDriver-BiDi] may return error + with error code invalid argument.

            Note

            This is to avoid [WebDriver-BiDi] monkey-patching the current spec. @@ -11267,24 +11270,24 @@

            WebDriver

          5. Let is string value be false.

          6. If value is a string set value to - the map «["fallbackDefault" + the map «["fallbackDefault" → value]» and set is string value to true. -

          7. If value is not a map return - error with error code invalid argument. +

          8. If value is not a map return + error with error code invalid argument. -

          9. Let user prompt handler be an empty map. +

          10. Let user prompt handler be an empty map.
          11. For each prompt typehandler in value:

            1. If is string value is false and valid prompt - types does not contain prompt type - return error with error code invalid argument. + types does not contain prompt type + return error with error code invalid argument.

            2. If known prompt handlers does not contain an entry - with handler key handler return error - with error code invalid argument. + with handler key handler return error + with error code invalid argument.

            3. Let notify be false. @@ -11302,7 +11305,7 @@

              WebDriver

            4. Let configuration be a prompt handler configuration with handler handler and notify notify. -

            5. Set user prompt +

            6. Set user prompt handler[prompt type] to configuration.

            @@ -11322,7 +11325,7 @@

            WebDriver

            1. If the user prompt handler - contains request prompt type: + contains request prompt type:

                @@ -11363,13 +11366,13 @@

                WebDriver

              1. If the user prompt handler is null, return "dismiss and notify". -

              2. If the user prompt handler has size 1, - and user prompt handler contains +

              3. If the user prompt handler has size 1, + and user prompt handler contains "fallbackDefault", return the result of serialize a prompt handler configuration with user prompt handler["fallbackDefault"]. -

              4. Let serialized be an empty map. +

              5. Let serialized be an empty map.

              6. For each keyvalue of user prompt handler: @@ -11384,7 +11387,7 @@

                WebDriver

              An annotated unexpected alert open error - is an error with error code unexpected alert open + is an error with error code unexpected alert open and an optional error data dictionary with the following entries: @@ -11464,7 +11467,7 @@

              WebDriver

              Example 12

              -When returning an error with unexpected alert open, +When returning an error with unexpected alert open, a remote end may choose to return the user prompt message as part of an additional "data" Object on the error representation: @@ -11508,11 +11511,11 @@

              WebDriver

              1. If session's current top-level browsing - context is no longer open, return error - with error code no such window. + context is no longer open, return error + with error code no such window.

              2. If the current user prompt is null, - return error with error code no such alert. + return error with error code no such alert.

              3. Dismiss the current user prompt. @@ -11539,11 +11542,11 @@

                WebDriver

                1. If session's current top-level browsing - context is no longer open, return error - with error code no such window. + context is no longer open, return error + with error code no such window.

                2. If the current user prompt is null, - return error with error code no such alert. + return error with error code no such alert.

                3. Accept the current user prompt. @@ -11570,11 +11573,11 @@

                  WebDriver

                  1. If session's current top-level browsing - context is no longer open, return error - with error code no such window. + context is no longer open, return error + with error code no such window.

                  2. If the current user prompt is null, - return error with error code no such alert. + return error with error code no such alert.

                  3. Let message be the text message associated with the current user prompt, @@ -11612,14 +11615,14 @@

                    WebDriver

                    from parameters.

                  4. If text is not a String, - return error with error code invalid argument. + return error with error code invalid argument.

                  5. If session's current top-level browsing - context is no longer open, return error - with error code no such window. + context is no longer open, return error + with error code no such window.

                  6. If the current user prompt is null, - return error with error code no such alert. + return error with error code no such alert.

                  7. Run the substeps for the API that created the current user prompt: @@ -11627,15 +11630,15 @@

                    WebDriver

                    window.alert
                    window.confirm -

                    Return error with - error code element not interactable. +

                    Return error with + error code element not interactable.

                    window.prompt

                    Do nothing.

                    Otherwise -

                    Return error with - error code unsupported operation. +

                    Return error with + error code unsupported operation.

                  8. Perform user agent dependent steps @@ -11658,9 +11661,9 @@

                    WebDriver

                    It is returned to the local end as a Base64 encoded string.

                    WebDriver provides the Take Screenshot command - to capture the top-level browsing context's initial viewport, + to capture the top-level browsing context's initial viewport, and a command Take Element Screenshot - for doing the same with the visible region of an element's + for doing the same with the visible region of an element's bounding rectangle after it has been scrolled into view.

                    In order to draw a bounding box from the framebuffer, @@ -11669,7 +11672,7 @@

                    WebDriver

                    1. If either the initial viewport's width or height is 0 CSS pixels, - return error with error code unable to capture screen. + return error with error code unable to capture screen.

                    2. Let paint width be the initial viewport's width – min(rectangle x coordinate, @@ -11679,9 +11682,9 @@

                      WebDriver

                      min(rectangle y coordinate, rectangle y coordinate + rectangle height dimension). -

                    3. Let canvas be a new canvas element, - and set its width - and height +

                    4. Let canvas be a new canvas element, + and set its width + and height to paint width and paint height, respectively.

                    5. Let context, a canvas context mode, @@ -11710,16 +11713,16 @@

                      WebDriver

                    To encode a canvas as - Base64 a canvas element: + Base64 a canvas element:

                      -
                    1. If the canvas element's bitmap's +

                    2. If the canvas element's bitmap's origin-clean flag is set to false, - return error with error code unable to capture screen. + return error with error code unable to capture screen. -

                    3. If the canvas element's bitmap +

                    4. If the canvas element's bitmap has no pixels (i.e. either its horizontal dimension or vertical dimension is zero) - then return error with error code unable to capture screen. + then return error with error code unable to capture screen.

                    5. Let file be a serialization of the canvas element's bitmap as a file, @@ -11756,20 +11759,20 @@

                      WebDriver

                      1. If session's current top-level browsing - context is no longer open, return error - with error code no such window. + context is no longer open, return error + with error code no such window.

                      2. When the user agent is next to run the animation frame callbacks:

                        1. Let root rect be session's current top-level browsing context's - document element's rectangle. + document element's rectangle.

                        2. Let screenshot result be the result of trying to call draw a bounding box from the framebuffer, given root rect as an argument. -

                        3. Let canvas be a canvas element +

                        4. Let canvas be a canvas element of screenshot result's data.

                        5. Let encoding result be the result of trying @@ -11799,15 +11802,15 @@

                          WebDriver

                          Note

                          The Take Element Screenshot command takes a screenshot of the visible region encompassed -by the bounding rectangle of an element. +by the bounding rectangle of an element.

                          The remote end steps, given session, URL variables and parameters are:

                          1. If session's current browsing context - is no longer open, return error with error - code no such window. + is no longer open, return error with error + code no such window.

                          2. Try to handle any user prompts with session. @@ -11829,7 +11832,7 @@

                            WebDriver

                            draw a bounding box from the framebuffer, given element rect as an argument. -

                          3. Let canvas be a canvas element +

                          4. Let canvas be a canvas element of screenshot result's data.

                          5. Let encoding result be the result of trying @@ -11856,19 +11859,19 @@

                            WebDriver

                            implementation must:

                              -
                            1. Let pages be an empty Set +
                            2. Let pages be an empty Set
                            3. For each range in pageRanges, run the following steps:
                              1. If range is not either a Number or - a String, return error with error + a String, return error with error code invalid argument.
                              2. If range is a Number:

                                1. If range is not an integer or is less than 0, - return error with error code invalid + return error with error code invalid argument
                                2. Append range to pages @@ -11879,7 +11882,7 @@

                                  WebDriver

                                  splitting range on a "-" character.
                                3. If rangeParts has fewer than 1 or more than 2 - elements, return error with error code invalid + elements, return error with error code invalid argument.
                                4. If rangeParts has one element, append the result @@ -11905,8 +11908,8 @@

                                  WebDriver

                                  second element of rangeParts.
                                5. If lowerBound is greater - than upperBound, return error - with error code invalid argument. + than upperBound, return error + with error code invalid argument.
                                6. Append all integers in the inclusive range lowerBound to upperBound @@ -11927,12 +11930,12 @@

                                  WebDriver

                                7. Let stripped be the result of stripping all leading and trailing whitespace characters from input. -
                                8. If stripped has zero length, return error with +
                                9. If stripped has zero length, return error with status invalid argument.
                                10. If stripped contains any characters outside the range U+0030 - U+0039 (i.e. 0 - 9) - inclusive, return error with status invalid argument. + inclusive, return error with status invalid argument.
                                11. Let output be the result of calling parseInt with string stripped and radix 10. @@ -11959,8 +11962,8 @@

                                  WebDriver

                                  1. If session's current top-level browsing - context is no longer open, return error - with error code no such window. + context is no longer open, return error + with error code no such window.

                                  2. Try to handle any user prompts with session. @@ -11971,7 +11974,7 @@

                                    WebDriver

                                  3. If orientation is not a String or does not have one of the values "landscape" or - "portrait", return error with error + "portrait", return error with error code invalid argument.

                                  4. Let scale be the result of getting a @@ -11980,14 +11983,14 @@

                                    WebDriver

                                  5. If scale is not a Number, or is less than 0.1 or greater than 2 - return error with error code invalid argument. + return error with error code invalid argument.

                                  6. Let background be the result of getting a property with default named "background" and with default false from parameters.

                                  7. If background is not a Boolean - return error with error code invalid argument. + return error with error code invalid argument.

                                  8. Let page be the result of getting a property with default named "page" and with a default of an @@ -12002,8 +12005,8 @@

                                    WebDriver

                                    default of 27.94 from page.

                                  9. If either of pageWidth or pageHeight is - not a Number, or is less than (2.54 / 72), return error - with error code invalid argument. + not a Number, or is less than (2.54 / 72), return error + with error code invalid argument.

                                    Note

                                    The minimum page size is 1 point, which is (2.54 / 72) as per absolute lengths. @@ -12031,14 +12034,14 @@

                                    WebDriver

                                  10. If any of marginTop, marginBottom, marginLeft, or marginRight is not a Number, or is less then 0, - return error with error code invalid argument. + return error with error code invalid argument.

                                  11. Let shrinkToFit be the result of getting a property with default named "shrinkToFit" and with default true from parameters.

                                  12. If shrinkToFit is not a Boolean - return error with error code invalid argument. + return error with error code invalid argument.

                                  13. Let pageRanges be the result of getting a property with default named "pageRanges" from @@ -12046,7 +12049,7 @@

                                    WebDriver

                                    empty Array.

                                  14. If pageRanges is not an Array - return error with error code invalid argument. + return error with error code invalid argument.

                                  15. When the user agent is next to run the animation frame callbacks, let pdfData be the result of trying @@ -12167,24 +12170,24 @@

                                    WebDriver

                                    Although WebDriver does not define a primitive - to ascertain the visibility of an element in the viewport, + to ascertain the visibility of an element in the viewport, we acknowledge that it is an important feature for many users. Here we include a recommended approach - which will give a simplified approximation of an element's visibility, + which will give a simplified approximation of an element's visibility, but please note that it relies only on tree-traversal, and only covers a subset of visibility checks. -

                                    The visibility of an element is guided +

                                    The visibility of an element is guided by what is perceptually visible to the human eye. - In this context, an element's displayedness + In this context, an element's displayedness does not relate to the visibility or display style properties.

                                    The approach recommended to implementors to ascertain - an element's visibility was originally developed by + an element's visibility was originally developed by the Selenium project, and is - based on crude approximations about an element's nature and - relationship in the tree. An element is in general to be + based on crude approximations about an element's nature and + relationship in the tree. An element is in general to be considered visible if any part of it is drawn on the canvas within the boundaries of the viewport. @@ -12200,7 +12203,7 @@

                                    WebDriver

                                  16. Let result be the result of calling function's [[Call]] internal method with arguments null and element. If this raises an exception, return - an error with error code unknown error. + an error with error code unknown error.

                                  17. Return success with data result.

                                    @@ -12592,7 +12595,7 @@

                                    WebDriver

                                    Page Visibility Specification [PAGE-VISIBILITY] @@ -14213,9 +14216,9 @@

                                    WebDriver

                                    [accname-1.1]
                                    Accessible Name and Description Computation 1.1. Joanmarie Diggs; Bryan Garaventa; Michael Cooper. W3C. 18 December 2018. W3C Recommendation. URL: https://www.w3.org/TR/accname-1.1/
                                    [CSP3]
                                    - Content Security Policy Level 3. Mike West; Antonio Sartori. W3C. 9 September 2024. W3C Working Draft. URL: https://www.w3.org/TR/CSP3/ + Content Security Policy Level 3. Mike West; Antonio Sartori. W3C. 14 October 2024. W3C Working Draft. URL: https://www.w3.org/TR/CSP3/
                                    [CSS-CASCADE-4]
                                    - CSS Cascading and Inheritance Level 4. Elika Etemad; Tab Atkins Jr.. W3C. 13 January 2022. W3C Candidate Recommendation. URL: https://www.w3.org/TR/css-cascade-4/ + CSS Cascading and Inheritance Level 4. Elika Etemad; Tab Atkins Jr. W3C. 13 January 2022. W3C Candidate Recommendation. URL: https://www.w3.org/TR/css-cascade-4/
                                    [CSS-DEVICE-ADAPT]
                                    CSS Device Adaptation Module Level 1. Rune Lillesveen; Florian Rivoal; Matt Rakow. W3C. 29 March 2016. W3C Working Draft. URL: https://www.w3.org/TR/css-device-adapt-1/
                                    [CSS21]
                                    @@ -14223,7 +14226,7 @@

                                    WebDriver

                                    [CSS3-BOX]
                                    CSS Box Model Module Level 3. Elika Etemad. W3C. 11 April 2024. W3C Recommendation. URL: https://www.w3.org/TR/css-box-3/
                                    [CSS3-DISPLAY]
                                    - CSS Display Module Level 3. Elika Etemad; Tab Atkins Jr.. W3C. 30 March 2023. W3C Candidate Recommendation. URL: https://www.w3.org/TR/css-display-3/ + CSS Display Module Level 3. Elika Etemad; Tab Atkins Jr. W3C. 30 March 2023. W3C Candidate Recommendation. URL: https://www.w3.org/TR/css-display-3/
                                    [CSS3-VALUES]
                                    CSS Values and Units Module Level 3. Tab Atkins Jr.; Elika Etemad. W3C. 22 March 2024. W3C Candidate Recommendation. URL: https://www.w3.org/TR/css-values-3/
                                    [CSSOM]
                                    @@ -14243,7 +14246,7 @@

                                    WebDriver

                                    [FETCH]
                                    Fetch Standard. Anne van Kesteren. WHATWG. Living Standard. URL: https://fetch.spec.whatwg.org/
                                    [fileapi]
                                    - File API. Marijn Kruisselbrink. W3C. 24 May 2024. W3C Working Draft. URL: https://www.w3.org/TR/FileAPI/ + File API. Marijn Kruisselbrink. W3C. 24 October 2024. W3C Working Draft. URL: https://www.w3.org/TR/FileAPI/
                                    [FULLSCREEN]
                                    Fullscreen API Standard. Philip Jägenstedt. WHATWG. Living Standard. URL: https://fullscreen.spec.whatwg.org/
                                    [GEOMETRY-1]
                                    @@ -14253,7 +14256,7 @@

                                    WebDriver

                                    [INFRA]
                                    Infra Standard. Anne van Kesteren; Domenic Denicola. WHATWG. Living Standard. URL: https://infra.spec.whatwg.org/
                                    [mediaqueries-4]
                                    - Media Queries Level 4. Florian Rivoal; Tab Atkins Jr.. W3C. 25 December 2021. W3C Candidate Recommendation. URL: https://www.w3.org/TR/mediaqueries-4/ + Media Queries Level 4. Florian Rivoal; Tab Atkins Jr. W3C. 25 December 2021. W3C Candidate Recommendation. URL: https://www.w3.org/TR/mediaqueries-4/
                                    [PAGE-VISIBILITY]
                                    Page Visibility (Second Edition). Jatinder Mann; Arvind Jain. W3C. 29 October 2013. W3C Recommendation. URL: https://www.w3.org/TR/page-visibility/
                                    [POINTER-EVENTS]
                                    @@ -14277,15 +14280,15 @@

                                    WebDriver

                                    [RFC6265bis]
                                    Cookies: HTTP State Management Mechanism. M. West; J. Wilander. IETF. Draft. URL: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-05
                                    [RFC7230]
                                    - Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7230.html + Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing. R. Fielding, Ed.; J. Reschke, Ed. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7230.html
                                    [RFC7231]
                                    - Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7231.html + Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content. R. Fielding, Ed.; J. Reschke, Ed. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7231.html
                                    [RFC7232]
                                    - Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7232.html + Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests. R. Fielding, Ed.; J. Reschke, Ed. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7232.html
                                    [RFC7234]
                                    - Hypertext Transfer Protocol (HTTP/1.1): Caching. R. Fielding, Ed.; M. Nottingham, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7234.html + Hypertext Transfer Protocol (HTTP/1.1): Caching. R. Fielding, Ed.; M. Nottingham, Ed.; J. Reschke, Ed. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7234.html
                                    [RFC7235]
                                    - Hypertext Transfer Protocol (HTTP/1.1): Authentication. R. Fielding, Ed.; J. Reschke, Ed.. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7235.html + Hypertext Transfer Protocol (HTTP/1.1): Authentication. R. Fielding, Ed.; J. Reschke, Ed. IETF. June 2014. Proposed Standard. URL: https://httpwg.org/specs/rfc7235.html
                                    [UAX29]
                                    Unicode Text Segmentation. Josh Hadley. Unicode Consortium. 28 August 2024. Unicode Standard Annex #29. URL: https://www.unicode.org/reports/tr29/tr29-45.html
                                    [UAX44]
                                    @@ -15020,37 +15023,39 @@

                                    WebDriver

                                  18. § 15.5 Processing actions (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17) (18) (19) (20) (21) (22) (23) (24) (25) (26) (27) (28) (29) (30) (31) (32) (33) (34) (35) (36) (37) (38) (39) (40) (41) (42) (43) (44) (45) (46) (47) (48) (49) (50)
                                  19. - § 15.6.3 Pointer actions (2) + § 15.6 Dispatching actions
                                  20. - § 15.6.4 Wheel actions (2) + § 15.6.3 Pointer actions (2)
                                  21. - § 15.7 Perform Actions (2) + § 15.6.4 Wheel actions (2)
                                  22. - § 15.8 Release Actions + § 15.7 Perform Actions (2)
                                  23. - § 16. User prompts + § 15.8 Release Actions
                                  24. - § 16.1 User Prompt Handler (2) (3) (4) (5) (6) + § 16. User prompts
                                  25. - § 16.2 Dismiss Alert (2) + § 16.1 User Prompt Handler (2) (3) (4) (5) (6)
                                  26. - § 16.3 Accept Alert (2) + § 16.2 Dismiss Alert (2)
                                  27. - § 16.4 Get Alert Text (2) + § 16.3 Accept Alert (2)
                                  28. - § 16.5 Send Alert Text (2) (3) (4) (5) + § 16.4 Get Alert Text (2)
                                  29. - § 17. Screen capture (2) (3) + § 16.5 Send Alert Text (2) (3) (4) (5)
                                  30. - § 17.1 Take Screenshot + § 17. Screen capture (2) (3)
                                  31. - § 17.2 Take Element Screenshot + § 17.1 Take Screenshot
                                  32. - § 18. Print (2) (3) (4) (5) (6) + § 17.2 Take Element Screenshot
                                  33. - § 18.1 Print Page (2) (3) (4) (5) (6) (7) (8) + § 18. Print (2) (3) (4) (5) (6)
                                  34. - § C. Element displayedness + § 18.1 Print Page (2) (3) (4) (5) (6) (7) (8) +
                                  35. + § C. Element displayedness