Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebDriver extension for sequential focus navigation #4151

Open
foolip opened this issue Oct 31, 2018 · 5 comments
Open

WebDriver extension for sequential focus navigation #4151

foolip opened this issue Oct 31, 2018 · 5 comments

Comments

@foolip
Copy link
Member

foolip commented Oct 31, 2018

https://html.spec.whatwg.org/multipage/interaction.html#sequential-focus-navigation

The algorithm starting with "When the user requests that focus move" is typically invoked by pressing the TAB key, but this may not be universally true. Having a WebDriver API for this would make it possible to trigger focus navigation without making such assumptions.

Straw proposal: An endpoint /session/{session id}/focus to which one would POST { "direction": "forward" } or { "direction": "backward" }.

Inspiration can be taken from:
https://w3c.github.io/permissions/#automation
https://w3c.github.io/reporting/#generate-test-report-command
w3c/sensors#369

This would help resolve web-platform-tests/wpt#13379, although it is not the only way it could be resolved.

@foolip
Copy link
Member Author

foolip commented Oct 31, 2018

@LukeZielinski, this might a good issue to take a look at if you want to understand all the steps currently required to add wpt automation capabilities, starting at the spec (here), implementing in CDP+ChromeDriver, exposing via testdriver.js, and then overriding it in testdriver-vendor.js to make it work using a completely different mechanism internally in Chromium :)

@hugoholgersson
Copy link

WPT tests need a signal for when it's time to verify the focus change.

Will this endpoint block until focus (activeElement) actually changed (success)?

When there's nothing to focus in the given direction (error), I think blocking until seqnav has completed makes sense too.

@foolip
Copy link
Member Author

foolip commented Nov 2, 2018

Yeah, the WebDriver endpoint and the testdriver.js wrapper would have to wait until the action is complete, like for clicking elements.

@domenic
Copy link
Member

domenic commented Aug 1, 2019

Does this make sense in the HTML repository, or perhaps would it be better in the WebDriver one?

@foolip
Copy link
Member Author

foolip commented Aug 2, 2019

It could be split either way. Currently almost all WebDriver commands are defined in the WebDriver spec, but IMHO that's a bit weird, similar to if most Web IDL interfaces were defined in a single place.

Nevertheless, I've filed w3c/webdriver#1438 since that would work too.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Aug 8, 2022
The current state of test_driver.send_keys and content_shell doesn't
allow focus navigation tests to be upstreamed to WPT. For example,
we can't do sequential focus navigation [1].

The current plan is to copy the existing focus-navigation tests to WPT
at external/wpt/shadow-dom/focus-navigation/ and keep the content_shell
tests at shadow-dom/focus-navigation/ for test coverage.

In the future, once [1] is resolved and we can run WPT test, we can remove
the duplicated tests that depends on the content_shell.

[1] whatwg/html#4151

Change-Id: Ib4232494162e19110dfb785034712d56d3ff9491
Bug: 769673
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Aug 9, 2022
The current state of test_driver.send_keys and content_shell doesn't
allow focus navigation tests to be upstreamed to WPT. For example,
we can't do sequential focus navigation [1].

The current plan is to copy the existing focus-navigation tests to WPT
at external/wpt/shadow-dom/focus-navigation/ and keep the content_shell
tests at shadow-dom/focus-navigation/ for test coverage.

In the future, once [1] is resolved and we can run WPT test, we can remove
the duplicated tests that depends on the content_shell.

[1] whatwg/html#4151

Change-Id: Ib4232494162e19110dfb785034712d56d3ff9491
Bug: 769673, 893480
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Aug 10, 2022
The current state of test_driver.send_keys and content_shell doesn't
allow sequential focus navigation [1].

The current plan is to copy the existing focus-navigation tests to WPT
at web_tests/external/wpt/shadow-dom/focus-navigation/ and keep
the content_shell tests at web_tests/shadow-dom/focus-navigation/ for
test coverage.

In the future, once [2] is resolved and we can run WPT test in chrome,
we can remove the duplicated tests that depends on the content_shell
in web_tests/shadow-dom/focus-navigation/ and enable the
web_tests/external/wpt/shadow-dom/focus-navigation/ tests.

[1] whatwg/html#4151
[2] crbug.com/893480

Change-Id: Ib4232494162e19110dfb785034712d56d3ff9491
Bug: 769673, 893480
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Aug 10, 2022
The current state of test_driver.send_keys and content_shell doesn't
allow sequential focus navigation [1].

The current plan is to copy the existing focus-navigation tests to WPT
at web_tests/external/wpt/shadow-dom/focus-navigation/ and keep
the content_shell tests at web_tests/shadow-dom/focus-navigation/ for
test coverage.

In the future, once [2] is resolved and we can run WPT test in chrome,
we can remove the duplicated tests that depends on the content_shell
in web_tests/shadow-dom/focus-navigation/ and enable the
web_tests/external/wpt/shadow-dom/focus-navigation/ tests.

[1] whatwg/html#4151
[2] crbug.com/893480

Change-Id: Ib4232494162e19110dfb785034712d56d3ff9491
Bug: 769673, 893480
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Aug 10, 2022
The current state of test_driver.send_keys and content_shell doesn't
allow sequential focus navigation [1].

The current plan is to copy the existing focus-navigation tests to WPT
at web_tests/external/wpt/shadow-dom/focus-navigation/ and keep
the content_shell tests at web_tests/shadow-dom/focus-navigation/ for
test coverage.

In the future, once [2] is resolved and we can run WPT test in chrome,
we can remove the duplicated tests that depends on the content_shell
in web_tests/shadow-dom/focus-navigation/ and enable the
web_tests/external/wpt/shadow-dom/focus-navigation/ tests.

[1] whatwg/html#4151
[2] crbug.com/893480

Change-Id: Ib4232494162e19110dfb785034712d56d3ff9491
Bug: 769673, 893480
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Aug 11, 2022
The current state of test_driver.send_keys and content_shell doesn't
allow sequential focus navigation [1].

The current plan is to copy the existing focus-navigation tests to WPT
at web_tests/external/wpt/shadow-dom/focus-navigation/ and keep
the content_shell tests at web_tests/shadow-dom/focus-navigation/ for
test coverage.

In the future, once [2] is resolved and we can run WPT test in chrome,
we can remove the duplicated tests that depends on the content_shell
in web_tests/shadow-dom/focus-navigation/ and enable the
web_tests/external/wpt/shadow-dom/focus-navigation/ tests.

[1] whatwg/html#4151
[2] crbug.com/893480

Change-Id: Ib4232494162e19110dfb785034712d56d3ff9491
Bug: 769673, 893480
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Aug 11, 2022
The current state of test_driver.send_keys and content_shell doesn't
allow sequential focus navigation [1].

The current plan is to copy the existing focus-navigation tests to WPT
at web_tests/external/wpt/shadow-dom/focus-navigation/ and keep
the content_shell tests at web_tests/shadow-dom/focus-navigation/ for
test coverage.

In the future, once [2] is resolved and we can run WPT test in chrome,
we can remove the duplicated tests that depends on the content_shell
in web_tests/shadow-dom/focus-navigation/ and enable the
web_tests/external/wpt/shadow-dom/focus-navigation/ tests.

[1] whatwg/html#4151
[2] crbug.com/893480

Change-Id: Ib4232494162e19110dfb785034712d56d3ff9491
Bug: 769673, 893480
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Aug 12, 2022
The current state of test_driver.send_keys and content_shell doesn't
allow sequential focus navigation [1].

The current plan is to copy the existing focus-navigation tests to WPT
at web_tests/external/wpt/shadow-dom/focus-navigation/ and keep
the content_shell tests at web_tests/shadow-dom/focus-navigation/ for
test coverage.

In the future, once [2] is resolved and we can run WPT test in chrome,
we can remove the duplicated tests that depends on the content_shell
in web_tests/shadow-dom/focus-navigation/ and enable the
web_tests/external/wpt/shadow-dom/focus-navigation/ tests.

[1] whatwg/html#4151
[2] crbug.com/893480

Change-Id: Ib4232494162e19110dfb785034712d56d3ff9491
Bug: 769673, 893480
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Aug 12, 2022
The current state of test_driver.send_keys and content_shell doesn't
allow sequential focus navigation [1].

The current plan is to copy the existing focus-navigation tests to WPT
at web_tests/external/wpt/shadow-dom/focus-navigation/ and keep
the content_shell tests at web_tests/shadow-dom/focus-navigation/ for
test coverage.

In the future, once [2] is resolved and we can run WPT test in chrome,
we can remove the duplicated tests that depends on the content_shell
in web_tests/shadow-dom/focus-navigation/ and enable the
web_tests/external/wpt/shadow-dom/focus-navigation/ tests.

[1] whatwg/html#4151
[2] crbug.com/893480

Change-Id: Ib4232494162e19110dfb785034712d56d3ff9491
Bug: 769673, 893480
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Aug 12, 2022
The current state of test_driver.send_keys and content_shell doesn't
allow sequential focus navigation [1].

The current plan is to copy the existing focus-navigation tests to WPT
at web_tests/external/wpt/shadow-dom/focus-navigation/ and keep
the content_shell tests at web_tests/shadow-dom/focus-navigation/ for
test coverage.

In the future, once [2] is resolved and we can run WPT test in chrome,
we can remove the duplicated tests that depends on the content_shell
in web_tests/shadow-dom/focus-navigation/ and enable the
web_tests/external/wpt/shadow-dom/focus-navigation/ tests.

[1] whatwg/html#4151
[2] crbug.com/893480

Change-Id: Ib4232494162e19110dfb785034712d56d3ff9491
Bug: 769673, 893480
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Aug 15, 2022
The current state of test_driver.send_keys and content_shell doesn't
allow sequential focus navigation [1].

The current plan is to copy the existing focus-navigation tests to WPT
at web_tests/external/wpt/shadow-dom/focus-navigation/ and keep
the content_shell tests at web_tests/shadow-dom/focus-navigation/ for
test coverage.

In the future, once [2] is resolved and we can run WPT test in chrome,
we can remove the duplicated tests that depends on the content_shell
in web_tests/shadow-dom/focus-navigation/ and enable the
web_tests/external/wpt/shadow-dom/focus-navigation/ tests.

[1] whatwg/html#4151
[2] crbug.com/893480

Change-Id: Ib4232494162e19110dfb785034712d56d3ff9491
Bug: 769673, 893480
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3817589
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Di Zhang <dizhangg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1035097}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Aug 15, 2022
The current state of test_driver.send_keys and content_shell doesn't
allow sequential focus navigation [1].

The current plan is to copy the existing focus-navigation tests to WPT
at web_tests/external/wpt/shadow-dom/focus-navigation/ and keep
the content_shell tests at web_tests/shadow-dom/focus-navigation/ for
test coverage.

In the future, once [2] is resolved and we can run WPT test in chrome,
we can remove the duplicated tests that depends on the content_shell
in web_tests/shadow-dom/focus-navigation/ and enable the
web_tests/external/wpt/shadow-dom/focus-navigation/ tests.

[1] whatwg/html#4151
[2] crbug.com/893480

Change-Id: Ib4232494162e19110dfb785034712d56d3ff9491
Bug: 769673, 893480
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3817589
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Di Zhang <dizhangg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1035097}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Sep 5, 2022
…stonly

Automatic update from web-platform-tests
Move focus-navigation tests to WPT

The current state of test_driver.send_keys and content_shell doesn't
allow sequential focus navigation [1].

The current plan is to copy the existing focus-navigation tests to WPT
at web_tests/external/wpt/shadow-dom/focus-navigation/ and keep
the content_shell tests at web_tests/shadow-dom/focus-navigation/ for
test coverage.

In the future, once [2] is resolved and we can run WPT test in chrome,
we can remove the duplicated tests that depends on the content_shell
in web_tests/shadow-dom/focus-navigation/ and enable the
web_tests/external/wpt/shadow-dom/focus-navigation/ tests.

[1] whatwg/html#4151
[2] crbug.com/893480

Change-Id: Ib4232494162e19110dfb785034712d56d3ff9491
Bug: 769673, 893480
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3817589
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Di Zhang <dizhangg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1035097}

--

wpt-commits: eba8286502b4f9c0ea7ee6b6f3666ee630da0785
wpt-pr: 35387
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this issue Oct 14, 2022
The current state of test_driver.send_keys and content_shell doesn't
allow sequential focus navigation [1].

The current plan is to copy the existing focus-navigation tests to WPT
at web_tests/external/wpt/shadow-dom/focus-navigation/ and keep
the content_shell tests at web_tests/shadow-dom/focus-navigation/ for
test coverage.

In the future, once [2] is resolved and we can run WPT test in chrome,
we can remove the duplicated tests that depends on the content_shell
in web_tests/shadow-dom/focus-navigation/ and enable the
web_tests/external/wpt/shadow-dom/focus-navigation/ tests.

[1] whatwg/html#4151
[2] crbug.com/893480

Change-Id: Ib4232494162e19110dfb785034712d56d3ff9491
Bug: 769673, 893480
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3817589
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Di Zhang <dizhangg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1035097}
NOKEYCHECK=True
GitOrigin-RevId: 977b43e9cab50a5ea9040b775874b6db638c9163
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants