From ec6c72b82981cc0ff3e53ce157f1894ef10a255f Mon Sep 17 00:00:00 2001 From: Dominique Hazael-Massieux Date: Sat, 17 Dec 2022 06:50:07 +0100 Subject: [PATCH] Namespace and export relevant definitions This facilitates re-use in other specifications --- index.html | 578 ++++++++++++++++++++++++++--------------------------- 1 file changed, 289 insertions(+), 289 deletions(-) diff --git a/index.html b/index.html index 81c20523..1c18da9f 100644 --- a/index.html +++ b/index.html @@ -363,7 +363,7 @@

Algorithms

otherwise let result be temp’s data field. -

The result of getting a property with name from object is defined as being the same as the result of calling Object.[[\GetOwnProperty]](name) on object. @@ -432,7 +432,7 @@

Processing model

is not possible to construct a complete HTTP request, the remote end must either close the connection, return an HTTP response with status code 500, or return - an error with error code unknown error. + an error with error code [= error code/unknown error =].
  • Let request match be the result of the algorithm to match a request with request’s @@ -462,7 +462,7 @@

    Processing model

    or null if there is no such matching session.
  • If the current session is null - send an error with error code invalid session id, + send an error with error code [= error code/invalid session id=], then jump to step 1 in this overall algorithm.

  • If the current session is not null: @@ -597,7 +597,7 @@

    Processing model

  • Write response bytes to the connection. -

    A url variable dictionary is defined +

    A url variable dictionary is defined as the mapping of a command’s URI template variable names to their corresponding values. @@ -637,14 +637,14 @@

    Routing requests

    does not match URL’s path.
  • If there are no entries in endpoints, - return error with error code unknown command. + return error with error code [= error code/unknown command =].

  • Remove each entry in endpoints for which the method column is not equal to method.

  • If there are no entries in endpoints, - return error with error code unknown method. + return error with error code [= error code/unknown method =].

  • There is now exactly one entry in endpoints; let entry be this entry. @@ -1093,7 +1093,7 @@

    Errors

    } -

    The following table lists each error code, +

    The following table lists each error code, its associated HTTP status, JSON error code, and a non-normative description of the error. @@ -1110,7 +1110,7 @@

    Errors

    - element click intercepted + element click intercepted 400 element click intercepted The Element Click command could not be completed @@ -1119,7 +1119,7 @@

    Errors

    - element not interactable + element not interactable 400 element not interactable A command could not be completed @@ -1129,7 +1129,7 @@

    Errors

    - insecure certificate + insecure certificate 400 insecure certificate Navigation caused @@ -1145,7 +1145,7 @@

    Errors

    - invalid cookie domain + invalid cookie domain 400 invalid cookie domain An illegal attempt was made to set a cookie @@ -1153,7 +1153,7 @@

    Errors

    - invalid element state + invalid element state 400 invalid element state A command could not be completed because the element is @@ -1163,14 +1163,14 @@

    Errors

    - invalid selector + invalid selector 400 invalid selector Argument was an invalid selector. - invalid session id + invalid session id 404 invalid session id Occurs if the given session id is not in the list of active sessions, @@ -1178,14 +1178,14 @@

    Errors

    - javascript error + javascript error 500 javascript error An error occurred while executing JavaScript supplied by the user. - move target out of bounds + move target out of bounds 500 move target out of bounds The target for mouse interaction is not in the browser’s viewport @@ -1193,7 +1193,7 @@

    Errors

    - no such alert + no such alert 404 no such alert An attempt was made to operate on a modal dialog @@ -1201,7 +1201,7 @@

    Errors

    - no such cookie + no such cookie 404 no such cookie No cookie matching the given path name @@ -1210,7 +1210,7 @@

    Errors

    - no such element + no such element 404 no such element An element could not be located on the page @@ -1218,7 +1218,7 @@

    Errors

    - no such frame + no such frame 404 no such frame A command to switch to a frame @@ -1226,7 +1226,7 @@

    Errors

    - no such window + no such window 404 no such window A command to switch to a window @@ -1234,28 +1234,28 @@

    Errors

    - no such shadow root + no such shadow root 404 no such shadow root The element does not have a shadow root. - script timeout error + script timeout error 500 script timeout A script did not complete before its timeout expired. - session not created + session not created 500 session not created A new session could not be created. - stale element reference + stale element reference 404 stale element reference A command failed because @@ -1263,7 +1263,7 @@

    Errors

    - detached shadow root + detached shadow root 404 detached shadow root A command failed because @@ -1271,35 +1271,35 @@

    Errors

    - timeout + timeout 500 timeout An operation did not complete before its timeout expired. - unable to set cookie + unable to set cookie 500 unable to set cookie A command to set a cookie’s value could not be satisfied. - unable to capture screen + unable to capture screen 500 unable to capture screen A screen capture was made impossible. - unexpected alert open + unexpected alert open 500 unexpected alert open A modal dialog was open, blocking this operation. - unknown command + unknown command 404 unknown command A command could not be executed @@ -1307,7 +1307,7 @@

    Errors

    - unknown error + unknown error 500 unknown error An unknown error occurred in the remote end @@ -1315,7 +1315,7 @@

    Errors

    - unknown method + unknown method 405 unknown method The requested command matched a known URL @@ -1323,7 +1323,7 @@

    Errors

    - unsupported operation + unsupported operation 500 unsupported operation Indicates that a command that should have @@ -1347,7 +1347,7 @@

    Extensions

    features.

    Commands defined in this way - are called extension commands + are called extension commands and behave no differently than other commands; each has a dedicated HTTP endpoint and a set of remote end steps. @@ -2295,7 +2295,7 @@

    New Sessio

    The New Session command creates a new WebDriver session with the endpoint node. -If the creation fails, a session not created error is returned. +If the creation fails, a [= error code/session not created =] error is returned.

    If the remote end is an intermediary node, it may use the result of the capabilities processing algorithm @@ -2356,11 +2356,11 @@

    New Sessio
    1. If the maximum active sessions is equal to the length of the list of active sessions, - return error with error code session not created. + return error with error code [= error code/session not created =].

    2. If the remote end is an intermediary node, take implementation-defined steps that either result in returning - an error with error code session not created, + an error with error code [= error code/session not created =], or in returning a success with data that is isomorphic to that returned by remote ends according to the rest of this algorithm. If an error is not returned, the intermediary @@ -2376,14 +2376,14 @@

      New Sessio
    3. If the maximum active sessions is equal to the length of the list of active sessions, - return error with error code session not created. + return error with error code [= error code/session not created =].

    4. Let capabilities be the result of trying to process capabilities with parameters as an argument.

    5. If capabilities’s is null, - return error with error code session not created. + return error with error code [= error code/session not created =].

    6. Let session id be the result of generating a UUID. @@ -2437,7 +2437,7 @@

      New Sessio

      Take implementation-defined steps to set the user agent proxy using the extracted proxy configuration. If the defined proxy cannot be configured return error with - error code session not created.

      + error code [= error code/session not created =].
      Otherwise
      Set a property of capabilities with name @@ -2786,7 +2786,7 @@

      Navigation

      Navigation actions are also affected by the value of the session page load timeout, which determines the maximum time that commands will block - before returning with a timeout error. + before returning with a [= error code/timeout =] error.

      The following is the table of page load strategies that links the pageLoadStrategy capability keyword @@ -2842,14 +2842,14 @@

      Navigation

      has a page loading strategy of none, return success with data null. -
    7. If the current browsing context is no longer open, +

    8. If the current browsing context is [= browsing context/no longer open =], return success with data null.

    9. Start a timer. If this algorithm has not completed before timer reaches the session’s session page load timeout in milliseconds, return an error with error - code timeout. + code [= error code/timeout =].

    10. If there is an ongoing attempt to navigate the current browsing context that has not @@ -2869,7 +2869,7 @@

      Navigation

    11. If the previous step completed by the session page load timeout being reached and the browser does not have an active user prompt, - return error with error code timeout. + return error with error code [= error code/timeout =].

    12. Return success with data null.

    @@ -2879,7 +2879,7 @@

    Navigation

    response is a network error -

    Return error with error code unknown error. +

    Return error with error code [= error code/unknown error =].

    A "network error" in this case is not an HTTP response with a status code indicating an unsuccessful result, but could be a problem occurring lower in the OSI model, or a @@ -2893,7 +2893,7 @@

    Navigation

    that would normally occur under these circumstances, are suppressed. -

    Otherwise return error with error code insecure certificate. +

    Otherwise return error with error code [= error code/insecure certificate =].

    response’s HTTP status is 401
    Otherwise @@ -2934,8 +2934,8 @@

    Navigate To

    The remote end steps are:

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

    2. If the current top-level browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

    3. Let url be the result of getting the property url @@ -2959,7 +2959,7 @@

      Navigate To

      a timer. If this algorithm has not completed before timer reaches the session’s session page load timeout in milliseconds, return an error - with error code timeout. + with error code [= error code/timeout =].
  • Navigate the current top-level browsing context to url. @@ -3002,8 +3002,8 @@

    Get Current URL

    The remote end steps are:

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

    2. If the current top-level browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

    3. Handle any user prompts and return its value if it is an error. @@ -3038,8 +3038,8 @@

      Back

      The remote end steps are:

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

      2. If the current top-level browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

      3. Handle any user prompts and return its value if it is an error. @@ -3054,7 +3054,7 @@

        Back

      4. If the previous step completed by the session page load timeout being reached, and user prompts have been handled, return error - with error code timeout. + with error code [= error code/timeout =].

      5. Return success with data null.

      @@ -3083,8 +3083,8 @@

      Forward

      The remote end steps are:

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

      2. If the current top-level browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

      3. Handle any user prompts and return its value if it is an error. @@ -3099,7 +3099,7 @@

        Forward

      4. If the previous step completed by the session page load timeout being reached, and user prompts have been handled, return error - with error code timeout. + with error code [= error code/timeout =].

      5. Return success with data null.

      @@ -3125,8 +3125,8 @@

      Refresh

      The remote end steps are:

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

      2. If the current top-level browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

      3. Handle any user prompts and return its value if it is an error. @@ -3169,8 +3169,8 @@

        Get Title

        The remote end steps are:

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

        2. If the current top-level browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

        3. Handle any user prompts and return its value if it is an error. @@ -3203,7 +3203,7 @@

          Contexts

          -

          A browsing context is said to be no longer open +

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

          Each browsing context has an associated @@ -3281,8 +3281,8 @@

          Get Window Handle

          The remote end steps are:

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

          2. If the current top-level browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

          3. Return success with data being the window handle associated with the current top-level browsing context. @@ -3306,8 +3306,8 @@

            Close Window

            The remote end steps are:

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

            2. If the current top-level browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

            3. Handle any user prompts and return its value if it is an error. @@ -3353,7 +3353,7 @@

              Switch To Window

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

            5. If handle is equal to the associated window handle for some top-level browsing context in @@ -3361,7 +3361,7 @@

              Switch To Window

              browsing context, and set the current top-level browsing context with context. -

              Otherwise, return error with error code no such window. +

              Otherwise, return error with error code [=error code/no such window=].

            6. Update any implementation-specific state that would result from the user selecting the current browsing context for @@ -3427,10 +3427,10 @@

              New Window

              1. If the implementation does not support creating new top-level browsing contexts, return error with error code - unsupported operation. + [= error code/unsupported operation =]. -

              2. If the current top-level browsing context is no longer open, - return error with error code no such window. +

              3. If the current top-level browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

              4. Handle any user prompts and return its value if it is an error. @@ -3513,9 +3513,9 @@

                Switch To Frame

                id is null
                  -
                1. If the current top-level browsing context is no - longer open, return error with error code no - such window. +

                2. If the current top-level browsing context is + [= browsing context/no longer open =], return error + with error code [= error code/no such window=].

                3. Handle any user prompts and return its value if it is an error. @@ -3530,9 +3530,9 @@

                  Switch To Frame

                4. If id is less than 0 or greater than 216 – 1, return error with error code invalid argument. -

                5. If the current browsing context is no - longer open, return error with error code no - such window. +

                6. If the current browsing context is + [= browsing context/no longer open =], return error + with error code [= error code/no such window =].

                7. Handle any user prompts and return its value if it is an error. @@ -3542,7 +3542,7 @@

                  Switch To Frame

                8. If id is not a supported property index of window, - return error with error code no such frame. + return error with error code [= error code/no such frame =].

                9. Let child window be the WindowProxy object obtained by @@ -3557,9 +3557,9 @@

                  Switch To Frame

                  id represents a web element
                    -
                  1. If the current browsing context is no - longer open, return error with error code no - such window. +

                  2. If the current browsing context is + [= browsing context/no longer open =], return error + with error code [= error code/no such window =].

                  3. Handle any user prompts and return its value if it is an error. @@ -3570,7 +3570,7 @@

                    Switch To Frame

                  4. If element is not a [^frame^] or [^iframe^] element, - return error with error code no such frame. + return error with error code [= error code/no such frame =].

                  5. Set the current browsing context with element’s nested navigable's active @@ -3615,15 +3615,15 @@

                    Switch To Parent Frame

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

                    2. If the current browsing context is [= browsing context/no + longer open=], return error with error code [= error code/no + such window =].

                    3. Return success with data null.

                    -
                  6. If the current parent browsing context is no longer - open, return error with error code no such - window. +

                  7. If the current parent browsing context is [= browsing context/no + longer open=], return error with error code [= error code/no + such window =].

                  8. Handle any user prompts and return its value if it is an error. @@ -3650,7 +3650,7 @@

                    Resizing and positioning windows

                    Support for these commands is determined by the window dimensioning/positioning capability. Where a command is not supported, - an unsupported operation error is returned. + an [= error code/unsupported operation =] error is returned.

                    The top-level browsing context has an associated window state @@ -3784,8 +3784,8 @@

                    Get Window Rect

                    The remote end steps are:

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

                    2. If the current top-level browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

                    3. Handle any user prompts and return its value if it is an error. @@ -3843,10 +3843,10 @@

                      Set Window Rect

                    4. If the remote end does not support the Set Window Rect command for the current top-level browsing context for any reason, - return error with error code unsupported operation. + return error with error code [= error code/unsupported operation =]. -

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

                    6. If the current top-level browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

                    7. Handle any user prompts and return its value if it is an error. @@ -3945,10 +3945,10 @@

                      Maximize Window

                    8. If the remote end does not support the Maximize Window command for the current top-level browsing context for any reason, - return error with error code unsupported operation. + return error with error code [= error code/unsupported operation =]. -

                    9. If the current top-level browsing context is no longer open, - return error with error code no such window. +

                    10. If the current top-level browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

                    11. Handle any user prompts and return its value if it is an error. @@ -3990,10 +3990,10 @@

                      Minimize Window

                    12. If the remote end does not support the Minimize Window command for the current top-level browsing context for any reason, - return error with error code unsupported operation. + return error with error code [= error code/unsupported operation =]. -

                    13. If the current top-level browsing context is no longer open, - return error with error code no such window. +

                    14. If the current top-level browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

                    15. Handle any user prompts and return its value if it is an error. @@ -4025,10 +4025,10 @@

                      Fullscreen Window

                      1. If the remote end does not support fullscreen - return error with error code unsupported operation. + return error with error code [= error code/unsupported operation =]. -

                      2. If the current top-level browsing context is no longer open, - return error with error code no such window. +

                      3. If the current top-level browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

                      4. Handle any user prompts and return its value if it is an error. @@ -4125,10 +4125,10 @@

                        Elements

                      5. If node is null, or node does not implement {{Element}}, or if node's [=Node/node document=] is not current browsing context's active document, return error - with error code no such element. + with error code [= error code/no such element =].
                      6. If node is stale, return error - with error code stale element reference. + with error code [= error code/stale element reference =].
                      7. Return success with node.
                      @@ -4407,11 +4407,11 @@

                      Shadow Roots

                    16. If node is null, or node does not implement {{ShadowRoot}}, or if node's [=Node/node document=] is not current browsing context's active document, return error - with error code no such shadow root. + with error code [= error code/no such shadow root =].
                    17. If shadow is detached, return error with error code - detached shadow root. + [= error code/detached shadow root =].
                    18. Return success with shadow.
                    @@ -4498,7 +4498,7 @@

                    Retrieval

                    a DOMException, SyntaxError, XPathException, or other error occurs during the execution of the element location strategy, return error - invalid selector. + [= error code/invalid selector =].
                  9. If elements returned is empty and the current time is less than end time return to step 4. Otherwise, @@ -4567,7 +4567,7 @@

                    CSS selectors
                    {{ParentNode/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. + [= error code/invalid selector =].
                  10. Return success with data elements.

                  @@ -4584,7 +4584,7 @@
                  Link text
                10. Let elements be the result of calling {{ParentNode/querySelectorAll()}} with start node as this and "a" as the argument. If this throws an exception, - return error with error code unknown error. + return error with error code [= error code/unknown error =].

                11. Let result be an empty {{NodeList}}. @@ -4625,7 +4625,7 @@

                  Partial link text
                12. Let elements be the result of calling {{ParentNode/querySelectorAll()}} with start node as this and "a" as the argument. If this throws an exception, - return error with error code unknown error. + return error with error code [= error code/unknown error =].

                13. Let result be an empty {{NodeList}}. @@ -4679,9 +4679,9 @@

                  XPath
                  property "snapshotLength" from evaluateResult. If this throws an XPathException return error with error - code invalid selector, otherwise if this throws any other - exception return error with error code unknown - error. + code [= error code/invalid selector =], otherwise if this throws any other + exception return error with error code [= error code/unknown + error=].
                14. Let result be an empty {{NodeList}}. @@ -4693,7 +4693,7 @@

                  XPath
                  argument.
                15. If node is not an element return an error - with error code invalid selector. + with error code [= error code/invalid selector =].

                16. Append node to result. @@ -4754,9 +4754,9 @@

                  Find Element

                17. If selector is undefined, return error with error code invalid argument. -

                18. If the current browsing context is no longer - open, return error with error code no such - window. +

                19. If the current browsing context is [= browsing context/no longer + open=], return error with error code [= error code/no such + window =].

                20. Handle any user prompts and return its value if it is an error. @@ -4764,14 +4764,14 @@

                  Find Element

                  the current browsing context’s document element.
                21. If start node is null, - return error with error code no such element. + return error with error code [= error code/no such element =].

                22. Let result be the result of trying to Find with start node, location strategy, and selector.

                23. If result is empty, return error - with error code no such element. Otherwise, return the + with error code [= error code/no such element =]. Otherwise, return the first element of result.

                @@ -4806,9 +4806,9 @@

                Find Elements

              5. If selector is undefined, return error with error code invalid argument. -

              6. If the current browsing context is no longer - open, return error with error code no such - window. +

              7. If the current browsing context is [= browsing context/no longer + open=], return error with error code [= error code/no such + window =].

              8. Handle any user prompts and return its value if it is an error. @@ -4816,7 +4816,7 @@

                Find Elements

                the current browsing context’s document element.
              9. If start node is null, - return error with error code no such element. + return error with error code [= error code/no such element =].

              10. Return the result of trying to Find with start node, location strategy, and selector. @@ -4853,9 +4853,9 @@

                Find Element From Element

              11. If selector is undefined, return error with error code invalid argument. -

              12. If the current browsing context is no longer - open, return error with error code no such - window. +

              13. If the current browsing context is [= browsing context/no longer + open=], return error with error code [= error code/no such + window =].

              14. Handle any user prompts and return its value if it is an error. @@ -4868,7 +4868,7 @@

                Find Element From Element

                and selector.
              15. If result is empty, return error - with error code no such element. Otherwise, return the + with error code [= error code/no such element =]. Otherwise, return the first element of result.

              @@ -4903,9 +4903,9 @@

              Find Elements From Element

            7. If selector is undefined, return error with error code invalid argument. -

            8. If the current browsing context is no longer - open, return error with error code no such - window. +

            9. If the current browsing context is [= browsing context/no longer + open=], return error with error code [= error code/no such + window =].

            10. Handle any user prompts and return its value if it is an error. @@ -4948,9 +4948,9 @@

              Find Element From Shadow Root

            11. If selector is undefined, return error with error code invalid argument. -

            12. If the current browsing context is no longer - open, return error with error code no such - window. +

            13. If the current browsing context is [= browsing context/no longer + open=], return error with error code [= error code/no such + window =].

            14. Handle any user prompts and return its value if it is an error. @@ -4963,7 +4963,7 @@

              Find Element From Shadow Root

              and selector.
            15. If result is empty, return error - with error code no such element. Otherwise, return the + with error code [= error code/no such element =]. Otherwise, return the first element of result.

            @@ -4998,9 +4998,9 @@

            Find Elements From Shadow Root

          4. If selector is undefined, return error with error code invalid argument. -

          5. If the current browsing context is no longer - open, return error with error code no such - window. +

          6. If the current browsing context is [= browsing context/no longer + open=], return error with error code [= error code/no such + window =].

          7. Handle any user prompts and return its value if it is an error. @@ -5030,9 +5030,9 @@

            Get Active Element

            The remote end steps are:

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

            2. If the current browsing context is [= browsing context/no longer + open=], return error with error code [= error code/no such + window =].

            3. Handle any user prompts and return its value if it is an error. @@ -5043,7 +5043,7 @@

              Get Active Element

              return success with data set to web element reference object for active element. -

              Otherwise, return error with error code no such element. +

              Otherwise, return error with error code [= error code/no such element =].

            @@ -5064,9 +5064,9 @@

            Get Element Shadow Root

            The remote end steps are:

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

            2. If the current browsing context is [= browsing context/no longer + open=], return error with error code [= error code/no such + window =].

            3. Handle any user prompts and return its value if it is an error. @@ -5077,7 +5077,7 @@

              Get Element Shadow Root

            4. Let shadow root be element's shadow root.

            5. If shadow root is null, return error - with error code no such shadow root. + with error code [= error code/no such shadow root =].

            6. Let serialized be the shadow root reference object for shadow root. @@ -5181,8 +5181,8 @@

              Is Element Selected

              The remote end steps are:

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

              2. If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

              3. Handle any user prompts and return its value if it is an error. @@ -5229,8 +5229,8 @@

                Get Element Attribute

                The remote end steps are:
                  -
                1. If the current browsing context is no longer open, - return error with error code no such window. +

                2. If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

                3. Handle any user prompts and return its value if it is an error. @@ -5281,8 +5281,8 @@

                  Get Element Property

                  The remote end steps are:
                    -
                  1. If the current browsing context is no longer open, - return error with error code no such window. +

                  2. If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

                  3. Handle any user prompts and return its value if it is an error. @@ -5318,8 +5318,8 @@

                    Get Element CSS Value

                    The remote end steps are:
                      -
                    1. If the current browsing context is no longer open, - return error with error code no such window. +

                    2. If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

                    3. Handle any user prompts and return its value if it is an error. @@ -5384,8 +5384,8 @@

                      Get Element Text

                      The remote end steps are:

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

                      2. If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

                      3. Handle any user prompts and return its value if it is an error. @@ -5421,8 +5421,8 @@

                        Get Element Tag Name

                        The remote end steps are:

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

                        2. If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

                        3. Handle any user prompts and return its value if it is an error. @@ -5485,8 +5485,8 @@

                          Get Element Rect

                          The remote end steps are:

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

                          2. If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

                          3. Handle any user prompts and return its value if it is an error. @@ -5537,8 +5537,8 @@

                            Is Element Enabled

                            The remote end steps are:

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

                            2. If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

                            3. Handle any user prompts and return its value if it is an error. @@ -5578,8 +5578,8 @@

                              Get Computed Role

                              The remote end steps are:

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

                              2. If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

                              3. Handle any user prompts and return its value if it is an error. @@ -5612,8 +5612,8 @@

                                Get Computed Label

                                1. -

                                  If the current browsing context is no longer open, - return error with error code no such window. +

                                  If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

                                2. Handle any user prompts and return its value if it is an error. @@ -5689,16 +5689,16 @@

                                  Element Click

                                  If the element’s center point is obscured by another element, -an element click intercepted error is returned. +an [= error code/element click intercepted =] error is returned. If the element is outside the viewport, -an element not interactable error is returned. +an [= error code/element not interactable =] error is returned.

                                  The remote end steps are:

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

                                  2. If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

                                  3. Handle any user prompts and return its value if it is an error. @@ -5712,11 +5712,11 @@

                                    Element Click

                                  4. Scroll into view the element’s container.

                                  5. If element’s container is still not in view, - return error with error code element not interactable. + return error with error code [= error code/element not interactable =].

                                  6. If element’s container is obscured by another element, - return error with error code element click intercepted. + return error with error code [= error code/element click intercepted =].

                                  7. Matching on element: @@ -5857,7 +5857,7 @@

                                    Element Clear

                                    -

                                    To clear a content editable element: +

                                    To clear a content editable element:

                                    1. If element’s innerHTML IDL attribute @@ -5902,8 +5902,8 @@

                                      Element Clear

                                      The remote end steps for Element Clear are:

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

                                      2. If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

                                      3. Handle any user prompts and return its value if it is an error. @@ -5912,7 +5912,7 @@

                                        Element Clear

                                        with element id.
                                      4. If element is not editable, - return an error with error code invalid element state. + return an error with error code [= error code/invalid element state =].

                                      5. Scroll into view the element. @@ -5921,7 +5921,7 @@

                                        Element Clear

                                        for element to become interactable.
                                      6. If element is not interactable, - return error with error code element not interactable. + return error with error code [= error code/element not interactable =].

                                      7. Run the substeps of the first matching statement: @@ -5933,7 +5933,7 @@

                                        Element Clear

                                        Invoke the steps to clear a content editable element.

                                        Otherwise -

                                        Return error with error code invalid element state. +

                                        Return error with error code [= error code/invalid element state =].

  • Return success with data null. @@ -5959,7 +5959,7 @@

    Element Send Keys

    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. +an [= error code/element not interactable =] error is returned.

    A non-typeable form control @@ -5991,7 +5991,7 @@

    Element Send Keys

    through “typing” by sending the null key, which is U+E000 (NULL). -

    To clear the modifier key state given input +

    To clear the modifier key state given input state, input id, source, undo actions, and browsing context: @@ -6026,7 +6026,7 @@

    Element Send Keys

    The shifted state for keyboard is the value of keyboard’s shift property. -

    To dispatch the events for a typeable string +

    To dispatch the events for a typeable string given input state, input id, source, text, and browsing context: @@ -6088,7 +6088,7 @@

    Element Send Keys

    -

    When required to dispatch a composition event +

    When required to dispatch a composition event given type and cluster, and browsing context, the remote end must perform implementation-specific action dispatch steps on browsing @@ -6114,7 +6114,7 @@

    Element Send Keys

    -

    To dispatch actions for a string given input +

    To dispatch actions for a string given input state, input id, source, text, and browsing context: @@ -6223,8 +6223,8 @@

    Element Send Keys

  • If text is not a String, return an error with error code invalid argument. -

  • If the current browsing context is no longer open, - return error with error code no such window. +

  • If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

  • Handle any user prompts, and return its value if it is an error. @@ -6246,7 +6246,7 @@

    Element Send Keys

    become keyboard-interactable.
  • If element is not keyboard-interactable, - return error with error code element not interactable. + return error with error code [= error code/element not interactable =].

  • If element is not the active element run the focusing steps for the element. @@ -6296,11 +6296,11 @@

    Element Send Keys

    1. If element does not have an own property named value return an error with error - code element not interactable + code [= error code/element not interactable =]

    2. If element is not mutable return - an error with error code element not - interactable. + an error with error code [= error code/element not + interactable =].

    3. Set a property value to text on element. @@ -6381,8 +6381,8 @@

      Get Page Source

      The remote end steps are:

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

      2. If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

      3. Handle any user prompts and return its value if it is an error. @@ -6493,14 +6493,14 @@

        Executing Script

        instance of {{Element}}

        If the element is stale, - return error with error code stale element reference. + return error with error code [= error code/stale element reference =].

        Otherwise return success with data set to the web element reference object for value.

        instance of {{ShadowRoot}}

        If the shadow root is detached, - return error with error code detached shadow root. + return error with error code [= error code/detached shadow root =].

        Otherwise return success with data set to the shadow root reference object for value. @@ -6509,7 +6509,7 @@

        Executing Script

        If the associated browsing context of the WindowProxy object in value has been destroyed, - return error with error code stale element reference. + return error with error code [= error code/stale element reference =].

        Otherwise return success with data set to WindowProxy reference object @@ -6525,7 +6525,7 @@

        Executing Script

        1. If value is in seen, - return error with error code javascript error. + return error with error code [= error code/javascript error =].

        2. Append value to seen. @@ -6569,7 +6569,7 @@

          Executing Script

        3. Let source property value be the result of getting a property named name from value. If doing so causes script to be run and that script throws an error, - return error with error code javascript error. + return error with error code [= error code/javascript error =].

        4. Let cloned property result be the result of calling the clone algorithm with arguments @@ -6698,8 +6698,8 @@

          Execute Script

          trying to extract the script arguments from a request with argument parameters. -
        5. If the current browsing context is no longer open, - return error with error code no such window. +

        6. If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

        7. Handle any user prompts, and return its value if it is an error. @@ -6728,7 +6728,7 @@

          Execute Script

        8. Upon rejection of promise with reason r, let result be a JSON clone of r, and - return error with error code javascript error + return error with error code [= error code/javascript error =] and data result.

        @@ -6761,8 +6761,8 @@

        Execute Async Script

        extract the script arguments from a request with argument parameters. -
      4. If the current browsing context is no longer open, - return error with error code no such window. +

      5. If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

      6. Handle any user prompts, and return its value if it is an error. @@ -6818,7 +6818,7 @@

        Execute Async Script

      7. Upon rejection of promise with reason r, let result be a JSON clone of r, and - return error with error code javascript error + return error with error code [= error code/javascript error =] and data result.

      @@ -7003,8 +7003,8 @@

      Get All Cookies

      The remote end steps are:

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

      2. If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

      3. Handle any user prompts, and return its value if it is an error. @@ -7041,8 +7041,8 @@

        Get Named Cookie

        The remote end steps are:

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

        2. If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

        3. Handle any user prompts, and return its value if it is an error. @@ -7053,7 +7053,7 @@

          Get Named Cookie

          return success with the serialized cookie as data.

          Otherwise, return error - with error code no such cookie. + with error code [= error code/no such cookie =].

        @@ -7082,14 +7082,14 @@

        Add Cookie

        listed in the table for cookie conversion, return error with error code invalid argument. -
      4. If the current browsing context is no longer open, - return error with error code no such window. +

      5. If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

      6. Handle any user prompts, and return its value if it is an error.

      7. If the current browsing context’s document element is a cookie-averse Document object, - return error with error code invalid cookie domain. + return error with error code [= error code/invalid cookie domain =].

      8. If cookie name or cookie value is null, cookie domain is not equal to @@ -7133,7 +7133,7 @@

        Add Cookie

        If there is an error during this step, - return error with error code unable to set cookie. + return error with error code [= error code/unable to set cookie =].

      9. Return success with data null. @@ -7157,8 +7157,8 @@

        Delete Cookie

        The remote end steps are:

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

        2. If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

        3. Handle any user prompts, and return its value if it is an error. @@ -7187,8 +7187,8 @@

          Delete All Cookies

          The remote end steps are:

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

          2. If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

          3. Handle any user prompts, and return its value if it is an error. @@ -7548,7 +7548,7 @@

            Input state

            -

            To get the input state given session +

            To get the input state given session and browsing context:

              @@ -7567,7 +7567,7 @@

              Input state

              context].
            -

            To reset the input state given session +

            To reset the input state given session and browsing context:

              @@ -7582,7 +7582,7 @@

              Input state

              context].
            -

            To create an input state: +

            To create an input state:

            1. Let input state be an input state with @@ -7592,7 +7592,7 @@

              Input state

            2. Return input state.

            -

            To add an input source given input state, +

            To add an input source given input state, input id, and source:

              @@ -7604,7 +7604,7 @@

              Input state

            -

            To remove an input source given input state, +

            To remove an input source given input state, and input id:

            1. Assert: None of the items in input @@ -7617,7 +7617,7 @@

              Input state

            2. Remove input state map[input id].
            -

            To get an input source given input state +

            To get an input source given input state and input id:

              @@ -7630,7 +7630,7 @@

              Input state

            1. Return undefined.

            -

            To get or create an input source given input +

            To get or create an input source given input state, type, input id, and optional subtype: @@ -7653,7 +7653,7 @@

            Input state

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

            To get the global key state given input state: +

            To get the global key state given input state:

            1. Let input state map be input @@ -7795,7 +7795,7 @@

              Processing actions

              input JSON, such that the actions to be performed in a single tick are grouped together. -

              To extract an action sequence with +

              To extract an action sequence with input state, and parameters:

                @@ -7924,7 +7924,7 @@

                Processing actions

                The default pointer parameters consist of an object with property pointerType set to mouse. -

                To process pointer parameters given +

                To process pointer parameters given parameters data:

                  @@ -7971,7 +7971,7 @@

                  Processing actions

                  properties added by other algorithms in this specification.

                  -To process a null action given +To process a null action given id and action item:

                    @@ -7999,7 +7999,7 @@

                    Processing actions

                  -To process a key action given +To process a key action given id and action item:

                    @@ -8044,7 +8044,7 @@

                    Processing actions

                    Return success with data action.
                  -

                  To process a pointer action given id, +

                  To process a pointer action given id, parameters, and action item:

                    @@ -8100,7 +8100,7 @@

                    Processing actions

                    Return success with data action.
                  -

                  To process a wheel action given +

                  To process a wheel action given id, and action item:

                    @@ -8203,7 +8203,7 @@

                    Processing actions

                    Return success with data action.
                  -

                  To process a pause action given action item, +

                  To process a pause action given action item, and action:

                    @@ -8221,7 +8221,7 @@

                    Processing actions

                  1. Return success with data action.

                  -

                  To process a pointer up or pointer down action +

                  To process a pointer up or pointer down action given action item, and action:

                    @@ -8347,7 +8347,7 @@

                    Processing actions

                  1. Return success with data null.

                  -

                  To process a pointer move action given action +

                  To process a pointer move action given action item, and action:

                    @@ -8517,7 +8517,7 @@

                    Dispatching actions

                    grouped by tick, and then causes each action to be run at the appropriate point in the sequence. -

                    To dispatch actions given input +

                    To dispatch actions given input state, actions by tick, and browsing context: @@ -8549,7 +8549,7 @@

                    Dispatching actions

                  1. Return actions result.

                  -

                  To dispatch actions inner given input +

                  To dispatch actions inner given input state, actions by tick, and browsing context: @@ -8586,7 +8586,7 @@

                  Dispatching actions

                To - compute the tick duration + compute the tick duration given tick actions:

                  @@ -8613,7 +8613,7 @@

                  Dispatching actions

                1. Return max duration.

                -

                To dispatch tick actions given input +

                To dispatch tick actions given input state, tick actions, tick duration, and browsing context: @@ -8678,7 +8678,7 @@

                Dispatching actions

              1. Return success with data null.

              -

              To dispatch a list of actions given input +

              To dispatch a list of actions given input state, actions and browsing context:

              -

              To dispatch a keyUp action given, action +

              To dispatch a keyUp action given, action object, source, global key state, tick duration, and browsing context:

              @@ -9150,7 +9150,7 @@

              Keyboard actions

              Pointer actions

              -

              To dispatch a pointerDown action given +

              To dispatch a pointerDown action given action object, input state, global key state, tick duration, and browsing context: @@ -9225,7 +9225,7 @@

              Pointer actions

            2. Return success with data null.

            -

            To dispatch a pointerUp action given, action +

            To dispatch a pointerUp action given, action object, source, global key state, tick duration, and browsing context: @@ -9274,7 +9274,7 @@

            Pointer actions

          4. Return success with data null.

          -

          To dispatch a pointerMove action given +

          To dispatch a pointerMove action given action object, source, global key state, tick duration, and browsing context: @@ -9327,13 +9327,13 @@

          Pointer actions

        4. 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 - bounds. + return error with error code [= error code/move target out of + bounds =].

        5. 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 - bounds. + return error with error code [= error code/move target out of + bounds =].

        6. Let duration be equal to action object’s duration property if it @@ -9387,7 +9387,7 @@

          Pointer actions

        7. Return success with data null.

        -

        To perform a pointer move given source, +

        To perform a pointer move given source, global key state, duration, start x, start y, target x, target y, width, height, pressure, tangentialPressure, @@ -9496,7 +9496,7 @@

        Pointer actions

      -

      To dispatch a pointerCancel action given +

      To dispatch a pointerCancel action given action object, source, global key state, tick duration, and browsing context: @@ -9515,7 +9515,7 @@

      Pointer actions

      Wheel actions

      -

      To dispatch a scroll action given +

      To dispatch a scroll action given action object, source, global key state, tick duration, and browsing context: @@ -9557,13 +9557,13 @@

      Wheel actions

    4. 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 - bounds. + return error with error code [= error code/move target out of + bounds =].

    5. 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 - bounds. + return error with error code [= error code/move target out of + bounds =].

    6. Let delta x be equal to the deltaX property of action object. @@ -9594,7 +9594,7 @@

      Wheel actions

    7. Return success with data null.

    -

    To perform a scroll given +

    To perform a scroll given duration, x, y, target delta x, target delta y, current delta x and current delta y: @@ -9710,9 +9710,9 @@

    Perform Actions

    to extract an action sequence given input state, and parameters. -
  • If the current browsing context is no longer - open, return error with error code no such - window. +

  • If the current browsing context is [= browsing context/no longer + open=], return error with error code [= error code/no such + window =].

  • Handle any user prompts. If this results in an error, return that error. @@ -9751,8 +9751,8 @@

    Release Actions

    The remote end steps are:

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

    2. If the current browsing context is [= browsing context/no longer open =], + return error with error code [=error code/no such window=].

    3. Let input state be the result of get the input state with current session and current @@ -9788,7 +9788,7 @@

      User prompts

      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 [=error code/unexpected alert open=] error will be returned.

      User prompts that are spawned from beforeunload event handlers, @@ -9914,7 +9914,7 @@

      User prompts

    An annotated unexpected alert open error - is an error with error code unexpected alert open + is an error with error code [=error code/unexpected alert open=] and an optional error data dictionary with the following entries: @@ -9924,7 +9924,7 @@

    User prompts

    message. -

    In order to handle any user prompts +

    In order to handle any user prompts a remote end must take the following steps:

      @@ -9966,7 +9966,7 @@

      User prompts