Skip to content

Commit

Permalink
[webdriver] normalize and fix links to the WebDriver spec (#23911)
Browse files Browse the repository at this point in the history
Spotted while looking for incoming links to the spec:
w3c/webdriver#1462 (comment)

(#dfn-set-window-rect changed to #set-window-rect for consistency, not
to enable the ID to be changed.)
  • Loading branch information
foolip authored Jun 2, 2020
1 parent 4c2484a commit 5d0dcf0
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 14 deletions.
4 changes: 1 addition & 3 deletions css/compositing/test-plan/test-plan.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,7 @@ <h3 aria-level="2" role="heading" id="h3_creating-automation-friendly-tests"><sp
is to ensure that most tests are automatable (i.e. they're either
reftests or use <code>testharness.js</code>). Even where manual tests
are absolutely necessary they should be written so that they can be
easily automated – as there are on-going efforts to make
WebDriver [<cite><a class="bibref" href="#bib-webdriver">webdriver</a></cite>] automated tests a first class citizen in W3C
testing. This means that even if a manual test requires user
easily automated. This means that even if a manual test requires user
interaction, the validation or PASS/FAIL conditions should still be
clear enough as to allow automatic validation if said interaction is
later automated.
Expand Down
8 changes: 4 additions & 4 deletions docs/writing-tests/testdriver-extension-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ We assume the following in this writeup:

## Introduction!

Let's implement window resizing. We can do this via the [Set Window Rect](https://w3c.github.io/webdriver/webdriver-spec.html#dfn-set-window-rect) command in WebDriver.
Let's implement window resizing. We can do this via the [Set Window Rect](https://w3c.github.io/webdriver/#set-window-rect) command in WebDriver.

First, we need to think of what the API will look like a little. We will be using WebDriver and Marionette for this, so we can look and see that they take in x, y coordinates, width and height integers.

Expand All @@ -30,7 +30,7 @@ window.test_driver = {
* Triggers browser window to be resized and relocated
*
* This matches the behaviour of the {@link
* https://w3c.github.io/webdriver/webdriver-spec.html#dfn-set-window-rect|WebDriver
* https://w3c.github.io/webdriver/#set-window-rect|WebDriver
* Set Window Rect command}.
*
* @param {Integer} x - The x coordinate of the top left of the window
Expand All @@ -56,7 +56,7 @@ window.test_driver_internal = {
* Triggers browser window to be resized and relocated
*
* This matches the behaviour of the {@link
* https://w3c.github.io/webdriver/webdriver-spec.html#dfn-set-window-rect|WebDriver
* https://w3c.github.io/webdriver/#set-window-rect|WebDriver
* Set Window Rect command}.
*
* @param {Integer} x - The x coordinate of the top left of the window
Expand Down Expand Up @@ -325,7 +325,7 @@ class GetWindowRectAction(object):
return self.protocol.get_window_rect.get_window_rect()
```
The WebDriver command will return a [WindowRect object](https://www.w3.org/TR/webdriver1/#dfn-window-rect), which is a dictionary with keys `x`, `y`, `width`, and `height`.
The WebDriver command will return a [WindowRect object](https://w3c.github.io/webdriver/#dfn-window-rect), which is a dictionary with keys `x`, `y`, `width`, and `height`.
```python
class WebDriverGetWindowRectProtocolPart(GetWindowRectProtocolPart):
def get_window_rect(self):
Expand Down
2 changes: 1 addition & 1 deletion docs/writing-tests/testdriver.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Note that if the element that the keys need to be sent to does not have
a unique ID, the document must not have any DOM mutations made
between the function being called and the promise settling.

To send special keys, one must send the respective key's codepoint. Since this uses the WebDriver protocol, you can find a [list for code points to special keys in the spec](https://w3c.github.io/webdriver/webdriver-spec.html#keyboard-actions).
To send special keys, one must send the respective key's codepoint. Since this uses the WebDriver protocol, you can find a [list for code points to special keys in the spec](https://w3c.github.io/webdriver/#keyboard-actions).
For example, to send the tab key you would send "\uE004".

[activation]: https://html.spec.whatwg.org/multipage/interaction.html#activation
Expand Down
4 changes: 2 additions & 2 deletions resources/testdriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
* Triggers a user-initiated click
*
* This matches the behaviour of the {@link
* https://w3c.github.io/webdriver/webdriver-spec.html#element-click|WebDriver
* https://w3c.github.io/webdriver/#element-click|WebDriver
* Element Click command}.
*
* @param {Element} element - element to be clicked
Expand Down Expand Up @@ -126,7 +126,7 @@
* Send keys to an element
*
* This matches the behaviour of the {@link
* https://w3c.github.io/webdriver/webdriver-spec.html#element-send-keys|WebDriver
* https://w3c.github.io/webdriver/#element-send-keys|WebDriver
* Send Keys command}.
*
* @param {Element} element - element to send keys to
Expand Down
2 changes: 1 addition & 1 deletion tools/webdriver/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# WebDriver client for Python

This package provides Python bindings
that conform to the [W3C WebDriver standard](https://w3c.github.io/webdriver/webdriver-spec.html),
that conform to the [W3C WebDriver standard](https://w3c.github.io/webdriver/),
which specifies a remote control protocol for web browsers.

These bindings are written with determining
Expand Down
2 changes: 1 addition & 1 deletion webdriver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Herein lies a set of conformance tests
for the W3C web browser automation specification
known as [WebDriver](http://w3c.github.io/webdriver/webdriver-spec.html).
known as [WebDriver](http://w3c.github.io/webdriver/).
The purpose of these tests is determine implementation compliance
so that different driver implementations can determine
whether they meet the recognized standard.
Expand Down
2 changes: 1 addition & 1 deletion webdriver/tests/get_named_cookie/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_get_named_session_cookie(session, url):
assert isinstance(cookie, dict)

# table for cookie conversion
# https://w3c.github.io/webdriver/webdriver-spec.html#dfn-table-for-cookie-conversion
# https://w3c.github.io/webdriver/#dfn-table-for-cookie-conversion
assert "name" in cookie
assert isinstance(cookie["name"], text_type)
assert "value" in cookie
Expand Down
2 changes: 1 addition & 1 deletion webdriver/tests/perform_actions/support/keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Keys(object):
"""
Set of special keys codes.
See also https://w3c.github.io/webdriver/#h-keyboard-actions
See also https://w3c.github.io/webdriver/#keyboard-actions
"""

NULL = u"\ue000"
Expand Down

0 comments on commit 5d0dcf0

Please sign in to comment.