New issue
Advanced search Search tips
Starred by 94 users

Issue metadata

Status: Assigned
Owner:
Components:

Blocking:
issue 1996
issue 2536


Show other hotlists

Hotlists containing this issue:
Hotlist-1


Sign in to add a comment
link

Issue 1897: Implement Actions API

Reported by kereliuk@chromium.org, Jul 25 2017 Project Member

Issue description

Implement the actions API from the webdriver spec: https://w3c.github.io/webdriver/webdriver-spec.html#actions
 

Comment 1 by bugdroid1@chromium.org, Jul 25 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e31fc584cf5d7400be6e73928ca9d115ff1f1fa5

commit e31fc584cf5d7400be6e73928ca9d115ff1f1fa5
Author: Jonathon Kereliuk <kereliuk@chromium.org>
Date: Tue Jul 25 18:41:41 2017

[Chromedriver] ExecutePerformActions method WIP

implementing actions API
Most of the logic for processing and dispatching is done helper methods
which will be submitted when this lands

Change-Id: I366f2db206de53ac92b3cece58f220f9b6148ba9

BUG=https://bugs.chromium.org/p/chromedriver/issues/detail?id=1897

Change-Id: I366f2db206de53ac92b3cece58f220f9b6148ba9
Reviewed-on: https://chromium-review.googlesource.com/582067
Commit-Queue: Jonathon Kereliuk <kereliuk@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489386}
[modify] https://crrev.com/e31fc584cf5d7400be6e73928ca9d115ff1f1fa5/chrome/test/chromedriver/window_commands.cc
[modify] https://crrev.com/e31fc584cf5d7400be6e73928ca9d115ff1f1fa5/chrome/test/chromedriver/window_commands.h

Comment 3 by bugdroid1@chromium.org, Oct 17 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3813cdc5d461f3f45465f8e63d1dbc9f1364ed4c

commit 3813cdc5d461f3f45465f8e63d1dbc9f1364ed4c
Author: Jonathon Kereliuk <kereliuk@chromium.org>
Date: Tue Oct 17 18:20:15 2017

Revert "[ChromeDriver] Key type actions for the actions API"

This reverts commit 4bd0cd567ddcdbcae606504a5fbb2c023eb9b4a2.

Reason for revert: broke the windows build, also didn't merge with current master recent enough

Original change's description:
> [ChromeDriver] Key type actions for the actions API
> 
> This CL contains the key type actions. Follow up CLs for tests and
> pointer/pause actions
> 
> spec: https://w3c.github.io/webdriver/webdriver-spec.html#actions
> 
> Bug: chromedriver:1897
> Change-Id: I135df58d97a45494e51a5ac09dfce021f7d094d3
> Reviewed-on: https://chromium-review.googlesource.com/692599
> Commit-Queue: Jonathon Kereliuk <kereliuk@chromium.org>
> Reviewed-by: John Chen <johnchen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#508958}

TBR=johnchen@chromium.org,kereliuk@chromium.org

Change-Id: I277dd783cc2a9e3f66615fb42eacabd07dcce71f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromedriver:1897
Reviewed-on: https://chromium-review.googlesource.com/721259
Reviewed-by: John Chen <johnchen@chromium.org>
Commit-Queue: Jonathon Kereliuk <kereliuk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509434}
[modify] https://crrev.com/3813cdc5d461f3f45465f8e63d1dbc9f1364ed4c/chrome/test/chromedriver/chrome/status.cc
[modify] https://crrev.com/3813cdc5d461f3f45465f8e63d1dbc9f1364ed4c/chrome/test/chromedriver/chrome/status.h
[modify] https://crrev.com/3813cdc5d461f3f45465f8e63d1dbc9f1364ed4c/chrome/test/chromedriver/server/http_handler.cc
[modify] https://crrev.com/3813cdc5d461f3f45465f8e63d1dbc9f1364ed4c/chrome/test/chromedriver/session.h
[modify] https://crrev.com/3813cdc5d461f3f45465f8e63d1dbc9f1364ed4c/chrome/test/chromedriver/window_commands.cc

Comment 4 by bugdroid1@chromium.org, Oct 20 2017

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a19af337b07eb6fc7ea3a229496b30739f67e620

commit a19af337b07eb6fc7ea3a229496b30739f67e620
Author: Jonathon Kereliuk <kereliuk@chromium.org>
Date: Fri Oct 20 15:01:26 2017

Reland "[ChromeDriver] Key type actions for the actions API"

This is a reland of 4bd0cd567ddcdbcae606504a5fbb2c023eb9b4a2
Original change's description:
> [ChromeDriver] Key type actions for the actions API
>
> This CL contains the key type actions. Follow up CLs for tests and
> pointer/pause actions
>
> spec: https://w3c.github.io/webdriver/webdriver-spec.html#actions
>
> Bug: chromedriver:1897
> Change-Id: I135df58d97a45494e51a5ac09dfce021f7d094d3
> Reviewed-on: https://chromium-review.googlesource.com/692599
> Commit-Queue: Jonathon Kereliuk <kereliuk@chromium.org>
> Reviewed-by: John Chen <johnchen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#508958}

Bug: chromedriver:1897
Change-Id: Ic6cc2fe03d8ea41f683563417c471d071bcfa624
Reviewed-on: https://chromium-review.googlesource.com/725522
Reviewed-by: John Chen <johnchen@chromium.org>
Commit-Queue: Jonathon Kereliuk <kereliuk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510435}
[modify] https://crrev.com/a19af337b07eb6fc7ea3a229496b30739f67e620/chrome/test/chromedriver/chrome/status.cc
[modify] https://crrev.com/a19af337b07eb6fc7ea3a229496b30739f67e620/chrome/test/chromedriver/chrome/status.h
[modify] https://crrev.com/a19af337b07eb6fc7ea3a229496b30739f67e620/chrome/test/chromedriver/server/http_handler.cc
[modify] https://crrev.com/a19af337b07eb6fc7ea3a229496b30739f67e620/chrome/test/chromedriver/session.h
[modify] https://crrev.com/a19af337b07eb6fc7ea3a229496b30739f67e620/chrome/test/chromedriver/window_commands.cc

Comment 5 by tonymob...@gmail.com, Feb 3 2018

Sorry to bother... I was just wondering: has this feature landed yet?
I maintain a Webdriver client https://mercmobily.github.io/best-webdriver/index.html and need to figure out if I should implement workarounds for the actions, or just wait a little bit till this one lands.

Please let me know. I am mainly writing this because looking at the changelog and the code, it *should* handle them. However, I am getting:

StatusCodeError: 404 - {"value":{"error":"unknown command","message":"(Session infochrome=63.0.3239.108)","stacktrace":"#0 0x00000054daec <unknown>\n#1 0x0000004cad83 <unknown>\n#2 0x0000004a9633 <unknown>\n#3 0x0000004a30b8 <unknown>\n#4 0x0000004882cf <unknown>\n#5 0x00000048938d <unknown>\n#6 0x00000055ccff <unknown>\n#7 0x00000055a6b7 <unknown>\n#8 0x00000055abc8 <unknown>\n#9 0x00000055d18a <unknown>\n#10 0x00000056f4c5 <unknown>\n#11 0x00000058ed5d <unknown>\n#12 0x00000058a5dd <unknown>\n#13 0x7fce41bd46da start_thread\n#14 0x7fce401e2d7f clone\n"}}

Comment 6 by karthik1...@gmail.com, Jun 12 2018

Hi,

I am working on automation of an Electron application(desktop) using spectron framework. The webdriverio's action commands are not working, the reason being actions is still not supported by Chromedriver. when can we expect actions to work with chromedriver.

Environment:
WebdriverIO version: 4.12.0
chromedriver version: 2.40
Node.js version: 8.11.1
Electron version: 1.8.4
Spectron version: 3.8.0
OS : windows 10

Thanks in advance
Karthik

Comment 7 by tobyhamm...@gmail.com, Jun 20 2018

Hi,

At the risk of posting a comment that boils down to "+1 me too", I'm also working a web application for which the Actions API is critical for testing.  In my case, we have some complex, timing-sensitive user gestures to reproduce in tests and the current API is insufficient because the latency between the test process and the remote web driver adds up when a separate command is required for each step.

Can you give us an idea of how much work this is to implement, or when we can expect it to be completed?  At this point I need to decide whether it's worth the effort to pursue some difficult/ugly workarounds for this.

Thanks!

Comment 8 by johnchen@chromium.org, Aug 3

Project Member
 Issue 2529  has been merged into this issue.

Comment 9 by johnchen@chromium.org, Aug 9

Project Member
Labels: StandardsCompliance

Comment 10 by foolip@chromium.org, Aug 17

Blocking: 2536

Comment 11 by foolip@chromium.org, Aug 21

Blocking: 1996

Comment 12 by foolip@chromium.org, Sep 6

Owner: lanwei@chromium.org
The plan is to work on this in Q4.

Comment 13 Deleted

Comment 14 Deleted

Comment 15 by khachatryan@chromium.org, Oct 30

 Issue 2614  has been merged into this issue.

Comment 16 by bugdroid1@chromium.org, Nov 28

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/357a1cb6feb68f6e2bf5d1f2a42aed543ba49c22

commit 357a1cb6feb68f6e2bf5d1f2a42aed543ba49c22
Author: Lan Wei <lanwei@chromium.org>
Date: Wed Nov 28 16:51:12 2018

[ChromeDriver] Modify ExecutePerformActions command

In order to match with WebDriver Action API, we need to modify the
command of ExecutePerformActions in ChromeDriver. I also add this new
action API in chromederiver.py and some tests to test this new API.

Because we have not added this Action API to CDP, I am using
Input.dispatchMouseEvent right now for mouse events only.

Bug: chromedriver:1897
Change-Id: I28cac07b58d570ab1a102ac7b13d3d06dac507d8
Reviewed-on: https://chromium-review.googlesource.com/c/1333831
Reviewed-by: John Chen <johnchen@chromium.org>
Reviewed-by: Navid Zolghadr <nzolghadr@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611732}
[modify] https://crrev.com/357a1cb6feb68f6e2bf5d1f2a42aed543ba49c22/chrome/test/chromedriver/chrome/ui_events.h
[modify] https://crrev.com/357a1cb6feb68f6e2bf5d1f2a42aed543ba49c22/chrome/test/chromedriver/client/chromedriver.py
[modify] https://crrev.com/357a1cb6feb68f6e2bf5d1f2a42aed543ba49c22/chrome/test/chromedriver/client/command_executor.py
[modify] https://crrev.com/357a1cb6feb68f6e2bf5d1f2a42aed543ba49c22/chrome/test/chromedriver/server/http_handler.cc
[modify] https://crrev.com/357a1cb6feb68f6e2bf5d1f2a42aed543ba49c22/chrome/test/chromedriver/session.cc
[modify] https://crrev.com/357a1cb6feb68f6e2bf5d1f2a42aed543ba49c22/chrome/test/chromedriver/test/run_py_tests.py
[modify] https://crrev.com/357a1cb6feb68f6e2bf5d1f2a42aed543ba49c22/chrome/test/chromedriver/window_commands.cc
[modify] https://crrev.com/357a1cb6feb68f6e2bf5d1f2a42aed543ba49c22/chrome/test/chromedriver/window_commands.h
[modify] https://crrev.com/357a1cb6feb68f6e2bf5d1f2a42aed543ba49c22/chrome/test/chromedriver/window_commands_unittest.cc

Comment 17 by bugdroid1@chromium.org, Dec 3

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3f54ff21132ed6350c2be20a02c92e00866a260a

commit 3f54ff21132ed6350c2be20a02c92e00866a260a
Author: John Chen <johnchen@chromium.org>
Date: Mon Dec 03 19:17:31 2018

[ChromeDriver] Add Release Actions endpoint

Add Release Actions endpoint as required by W3C spec, and connects the
endpoint to a partial implementation, which doesn't yet include the
processing of input cancel list.

Bug: chromedriver:1897
Change-Id: I8c00c6b76233ef325d562c3a5c123f5e94276064
Reviewed-on: https://chromium-review.googlesource.com/c/1357840
Reviewed-by: Caleb Rouleau <crouleau@chromium.org>
Reviewed-by: Lan Wei <lanwei@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613185}
[modify] https://crrev.com/3f54ff21132ed6350c2be20a02c92e00866a260a/chrome/test/chromedriver/client/chromedriver.py
[modify] https://crrev.com/3f54ff21132ed6350c2be20a02c92e00866a260a/chrome/test/chromedriver/client/command_executor.py
[modify] https://crrev.com/3f54ff21132ed6350c2be20a02c92e00866a260a/chrome/test/chromedriver/log_replay/client_replay.py
[modify] https://crrev.com/3f54ff21132ed6350c2be20a02c92e00866a260a/chrome/test/chromedriver/server/http_handler.cc
[modify] https://crrev.com/3f54ff21132ed6350c2be20a02c92e00866a260a/chrome/test/chromedriver/session.cc
[modify] https://crrev.com/3f54ff21132ed6350c2be20a02c92e00866a260a/chrome/test/chromedriver/session.h
[modify] https://crrev.com/3f54ff21132ed6350c2be20a02c92e00866a260a/chrome/test/chromedriver/window_commands.cc
[modify] https://crrev.com/3f54ff21132ed6350c2be20a02c92e00866a260a/chrome/test/chromedriver/window_commands.h

Comment 18 by bugdroid1@chromium.org, Dec 7

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e23a3ef1703826def757c0097b08ca1d6e383d82

commit e23a3ef1703826def757c0097b08ca1d6e383d82
Author: Lan Wei <lanwei@chromium.org>
Date: Fri Dec 07 22:05:41 2018

[ChromeDriver] Make some mouse web platform tests work on wpt serve

I have changed ExecutePerformActions function in window_commands.cc to
execute the actions input sent from Webdriver and convert an element
in origin into coordinates.

Bug: chromedriver:1897
Change-Id: I407dbad5e001f15ddd4edfd709f5460384e95530
Reviewed-on: https://chromium-review.googlesource.com/c/1356123
Reviewed-by: John Chen <johnchen@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614838}
[modify] https://crrev.com/e23a3ef1703826def757c0097b08ca1d6e383d82/chrome/test/chromedriver/window_commands.cc
[modify] https://crrev.com/e23a3ef1703826def757c0097b08ca1d6e383d82/third_party/blink/web_tests/external/wpt/infrastructure/metadata/infrastructure/testdriver/actions/elementPosition.html.ini

Comment 19 by bugdroid1@chromium.org, Dec 12

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a33c477a8ae63a402d14c4785ebc2c561887d85e

commit a33c477a8ae63a402d14c4785ebc2c561887d85e
Author: Lan Wei <lanwei@chromium.org>
Date: Wed Dec 12 17:23:52 2018

[ChromeDriver] Modify ExecutePerformActions to handle touch inputs

In ExecutePerformActions function, we add the code to handle touch
inputs. However, right now we are using EventTarget.dispatchEvent() to
send touch events, we should use another way to dispatch the touch
events.

Bug: chromedriver:1897
Change-Id: Idbecb39270d3abf80a30e5fd13fc0f5ff2ba5b3f
Reviewed-on: https://chromium-review.googlesource.com/c/1372663
Reviewed-by: John Chen <johnchen@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615937}
[modify] https://crrev.com/a33c477a8ae63a402d14c4785ebc2c561887d85e/chrome/test/chromedriver/test/run_py_tests.py
[modify] https://crrev.com/a33c477a8ae63a402d14c4785ebc2c561887d85e/chrome/test/chromedriver/window_commands.cc
[modify] https://crrev.com/a33c477a8ae63a402d14c4785ebc2c561887d85e/chrome/test/chromedriver/window_commands_unittest.cc

Comment 20 by bugdroid1@chromium.org, Dec 13

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/615188c32e78d4682cdcabd3589ffdd7371612ed

commit 615188c32e78d4682cdcabd3589ffdd7371612ed
Author: John Chen <johnchen@chromium.org>
Date: Thu Dec 13 19:46:04 2018

[ChromeDriver] Fixes for pause actions

Fix a bug in the processing of pause subtype of key actions, as reported
by james.h.evans.jr@gmail.com. Also factor out code that processes pause
actions to ensure consistency.

Bug: chromedriver:1897
Change-Id: I68af8f7025dc344683554f9954576a0ac568e4d7
Reviewed-on: https://chromium-review.googlesource.com/c/1376108
Reviewed-by: Lan Wei <lanwei@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616400}
[modify] https://crrev.com/615188c32e78d4682cdcabd3589ffdd7371612ed/chrome/test/chromedriver/window_commands.cc

Comment 21 by bugdroid1@chromium.org, Dec 15

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/85d86cd0a2a2fd5e45874885e4b5b83d06c8481a

commit 85d86cd0a2a2fd5e45874885e4b5b83d06c8481a
Author: John Chen <johnchen@chromium.org>
Date: Sat Dec 15 00:31:32 2018

[ChromeDriver] Fix matching of input source types

When a Perform Actions command uses multiple input sources, the code
was looping through the sources in the forward direction, but was
looping through the source types in the backward direction, causing
mismatches and errors. This is now fixed. Also fixing inconsistent
property usages between key actions and pointer actions.

We are still dispatching action events in the wrong order (by source,
instead of by time). That will be fixed in a future CL.

Bug: chromedriver:1897
Change-Id: Iff9259b4deb81a60d3614968c2681ac543e3c3a5
Reviewed-on: https://chromium-review.googlesource.com/c/1379111
Commit-Queue: John Chen <johnchen@chromium.org>
Reviewed-by: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616893}
[modify] https://crrev.com/85d86cd0a2a2fd5e45874885e4b5b83d06c8481a/chrome/test/chromedriver/window_commands.cc
[modify] https://crrev.com/85d86cd0a2a2fd5e45874885e4b5b83d06c8481a/chrome/test/chromedriver/window_commands_unittest.cc

Comment 22 by bugdroid1@chromium.org, Dec 17

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e8579a7994129403a1b5b9917edd99e5b8733cec

commit e8579a7994129403a1b5b9917edd99e5b8733cec
Author: Lan Wei <lanwei@chromium.org>
Date: Mon Dec 17 19:47:23 2018

Query the element's position right before dispatching the actions

Because the page layout may be changed after each action, before we
dispatch each pointermove action, we need to check the element's
position on the page in case some layout changes happened.

Bug: chromedriver:1897
Change-Id: I6404979ddd1af97fa194c4df5d616e93f7403fc4
Reviewed-on: https://chromium-review.googlesource.com/c/1376713
Reviewed-by: John Chen <johnchen@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617191}
[modify] https://crrev.com/e8579a7994129403a1b5b9917edd99e5b8733cec/chrome/test/chromedriver/chrome/ui_events.cc
[modify] https://crrev.com/e8579a7994129403a1b5b9917edd99e5b8733cec/chrome/test/chromedriver/chrome/ui_events.h
[modify] https://crrev.com/e8579a7994129403a1b5b9917edd99e5b8733cec/chrome/test/chromedriver/chrome/web_view_impl.cc
[modify] https://crrev.com/e8579a7994129403a1b5b9917edd99e5b8733cec/chrome/test/chromedriver/window_commands.cc
[delete] https://crrev.com/afd8eed5bc579a35f6e530d9b588abf3220ecef7/third_party/blink/web_tests/external/wpt/infrastructure/metadata/infrastructure/testdriver/actions/elementTiming.html.ini
[modify] https://crrev.com/e8579a7994129403a1b5b9917edd99e5b8733cec/third_party/blink/web_tests/external/wpt/infrastructure/metadata/infrastructure/testdriver/actions/eventOrder.html.ini
[modify] https://crrev.com/e8579a7994129403a1b5b9917edd99e5b8733cec/third_party/blink/web_tests/external/wpt/infrastructure/metadata/infrastructure/testdriver/actions/multiDevice.html.ini

Comment 23 by bugdroid1@chromium.org, Jan 2

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d387faf49936d80d16706e4595ef95a41db3248c

commit d387faf49936d80d16706e4595ef95a41db3248c
Author: Lan Wei <lanwei@chromium.org>
Date: Wed Jan 02 20:08:08 2019

Support pen inputs in web platform tests

Because pen inputs are very similar to mouse inputs, for now, we use
mouse events to represent pen events with pointer type of "pen".

Bug: chromedriver:1897
Change-Id: I0c830f65a1f1bdf1bc6d4a5ef042fc333d18d4ca
Reviewed-on: https://chromium-review.googlesource.com/c/1381144
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: John Chen <johnchen@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619474}
[modify] https://crrev.com/d387faf49936d80d16706e4595ef95a41db3248c/chrome/test/chromedriver/chrome/ui_events.cc
[modify] https://crrev.com/d387faf49936d80d16706e4595ef95a41db3248c/chrome/test/chromedriver/chrome/ui_events.h
[modify] https://crrev.com/d387faf49936d80d16706e4595ef95a41db3248c/chrome/test/chromedriver/chrome/web_view_impl.cc
[modify] https://crrev.com/d387faf49936d80d16706e4595ef95a41db3248c/chrome/test/chromedriver/window_commands.cc
[modify] https://crrev.com/d387faf49936d80d16706e4595ef95a41db3248c/content/browser/devtools/protocol/input_handler.cc
[modify] https://crrev.com/d387faf49936d80d16706e4595ef95a41db3248c/content/browser/devtools/protocol/input_handler.h
[modify] https://crrev.com/d387faf49936d80d16706e4595ef95a41db3248c/third_party/blink/renderer/core/inspector/browser_protocol.pdl
[modify] https://crrev.com/d387faf49936d80d16706e4595ef95a41db3248c/third_party/blink/web_tests/TestExpectations
[rename] https://crrev.com/d387faf49936d80d16706e4595ef95a41db3248c/third_party/blink/web_tests/external/wpt/pointerevents/pointerevent_pointerout_pen.html
[delete] https://crrev.com/f47c6e53b790d21d31e0879969f1bd04f0b3dc13/third_party/blink/web_tests/external/wpt_automation/pointerevents/pointerevent_pointerout_pen-manual-automation.js

Comment 24 by bugdroid1@chromium.org, Jan 2

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1ee5d1e6a9d8d735d9bfb95ea4931c14a0c8f63f

commit 1ee5d1e6a9d8d735d9bfb95ea4931c14a0c8f63f
Author: John Chen <johnchen@chromium.org>
Date: Wed Jan 02 20:36:56 2019

[ChromeDriver] Fix issues in keyboard actions

Fixing various issues in the implementation of keyboard actions, including:
* Proper handling of modifier keys.
* Use W3C spec compliant codes and names for keys.
* Setting key location property.
* Keeping track of key presses between multiple actions.

Most of the logic is in ConvertKeyActionToKeyEvent function, which was
based on ConvertKeysToKeyEvents function for legacy (non action based)
keyboard support.

ChromeDriver now passes most WPT test cases for keyboard actions
(webdriver/tests/perform_actions/key*.py), except:
* 4 failures in key_special_keys.py, because Unicode characters
  above U+FFFF and grapheme clusters are not yet supported.
* 7 failures in key_events.py, due to inconsistency in "code for key"
  table in W3C spec (https://github.com/w3c/webdriver/pull/1384).
* 4 failures in key_events.py, because Chrome refers to the Meta keys
  as MetaLeft and MetaRight, while WPT names them OSLeft and OSRight.

Bug: chromedriver:1897
Change-Id: Icaf9fff81c7e8127a849699f90871d8d24af4dfa
Reviewed-on: https://chromium-review.googlesource.com/c/1392056
Reviewed-by: Lan Wei <lanwei@chromium.org>
Reviewed-by: Caleb Rouleau <crouleau@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619480}
[modify] https://crrev.com/1ee5d1e6a9d8d735d9bfb95ea4931c14a0c8f63f/chrome/test/chromedriver/chrome/ui_events.cc
[modify] https://crrev.com/1ee5d1e6a9d8d735d9bfb95ea4931c14a0c8f63f/chrome/test/chromedriver/chrome/ui_events.h
[modify] https://crrev.com/1ee5d1e6a9d8d735d9bfb95ea4931c14a0c8f63f/chrome/test/chromedriver/chrome/web_view_impl.cc
[modify] https://crrev.com/1ee5d1e6a9d8d735d9bfb95ea4931c14a0c8f63f/chrome/test/chromedriver/key_converter.cc
[modify] https://crrev.com/1ee5d1e6a9d8d735d9bfb95ea4931c14a0c8f63f/chrome/test/chromedriver/key_converter.h
[modify] https://crrev.com/1ee5d1e6a9d8d735d9bfb95ea4931c14a0c8f63f/chrome/test/chromedriver/window_commands.cc

Comment 25 by bugdroid1@chromium.org, Jan 2

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/70ffd44758afa0d3d2a7c71adf4d4513190306e4

commit 70ffd44758afa0d3d2a7c71adf4d4513190306e4
Author: John Chen <johnchen@chromium.org>
Date: Wed Jan 02 21:55:12 2019

[ChromeDriver] Handle pauses in Perform Actions

W3C spec allows the app to specify pauses within Perform Actions command
(https://w3c.github.io/webdriver/#dfn-dispatch-actions). Updating
ChromeDriver to handle these pauses.

Bug: chromedriver:1897
Change-Id: I533179f4a9f2216bfacf0f4fdb539c8f898bed07
Reviewed-on: https://chromium-review.googlesource.com/c/1392281
Commit-Queue: John Chen <johnchen@chromium.org>
Reviewed-by: Caleb Rouleau <crouleau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619506}
[modify] https://crrev.com/70ffd44758afa0d3d2a7c71adf4d4513190306e4/chrome/test/chromedriver/test/run_py_tests.py
[modify] https://crrev.com/70ffd44758afa0d3d2a7c71adf4d4513190306e4/chrome/test/chromedriver/window_commands.cc

Comment 26 by bugdroid1@chromium.org, Jan 3

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/88c8a358ea117ed23ce1af65e75dcb6ba7e4a35d

commit 88c8a358ea117ed23ce1af65e75dcb6ba7e4a35d
Author: Tommy Steimel <steimel@chromium.org>
Date: Thu Jan 03 17:17:52 2019

Revert "[ChromeDriver] Handle pauses in Perform Actions"

This reverts commit 70ffd44758afa0d3d2a7c71adf4d4513190306e4.

Reason for revert: Causing failures on Mac 10.13 bot: https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mac10.13%20Tests/8478

Original change's description:
> [ChromeDriver] Handle pauses in Perform Actions
> 
> W3C spec allows the app to specify pauses within Perform Actions command
> (https://w3c.github.io/webdriver/#dfn-dispatch-actions). Updating
> ChromeDriver to handle these pauses.
> 
> Bug: chromedriver:1897
> Change-Id: I533179f4a9f2216bfacf0f4fdb539c8f898bed07
> Reviewed-on: https://chromium-review.googlesource.com/c/1392281
> Commit-Queue: John Chen <johnchen@chromium.org>
> Reviewed-by: Caleb Rouleau <crouleau@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#619506}

TBR=lanwei@chromium.org,crouleau@chromium.org,johnchen@chromium.org

Change-Id: Ia03b2b463e5baa93ec1e96c773f38eb9c82f2808
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromedriver:1897
Reviewed-on: https://chromium-review.googlesource.com/c/1394664
Reviewed-by: Tommy Steimel <steimel@chromium.org>
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619666}
[modify] https://crrev.com/88c8a358ea117ed23ce1af65e75dcb6ba7e4a35d/chrome/test/chromedriver/test/run_py_tests.py
[modify] https://crrev.com/88c8a358ea117ed23ce1af65e75dcb6ba7e4a35d/chrome/test/chromedriver/window_commands.cc

Comment 27 by bugdroid1@chromium.org, Jan 3

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c368d9b6d129ff6b01d87b3ec840d7779010db7b

commit c368d9b6d129ff6b01d87b3ec840d7779010db7b
Author: John Chen <johnchen@chromium.org>
Date: Thu Jan 03 19:30:00 2019

Reland "[ChromeDriver] Handle pauses in Perform Actions"

This is a reland of 70ffd44758afa0d3d2a7c71adf4d4513190306e4

Original change was reverted due to test flakiness on Mac, caused by:
* Pause time often goes above the upper limit of 300 ms, sometime more than
  double the limit.
* Occasionally the first event is missing.

The following changes are made to improve test reliability:
* Remove the check of an upper limit for the pause time. With the wide range
  of actual pause time, there appears to be no feasible upper limit to use.
* The first significant event is now pointer down instead of key down, to
  ensure that the target element receives focus. The previous dependence on
  autofocus attribute appears to be unreliable.
* Change mouse button from 1 (middle) to 0 (left), as the middle mouse button
  triggers paste on some platforms. (It was a typo.)

Original change's description:
> [ChromeDriver] Handle pauses in Perform Actions
>
> W3C spec allows the app to specify pauses within Perform Actions command
> (https://w3c.github.io/webdriver/#dfn-dispatch-actions). Updating
> ChromeDriver to handle these pauses.
>
> Bug: chromedriver:1897
> Change-Id: I533179f4a9f2216bfacf0f4fdb539c8f898bed07
> Reviewed-on: https://chromium-review.googlesource.com/c/1392281
> Commit-Queue: John Chen <johnchen@chromium.org>
> Reviewed-by: Caleb Rouleau <crouleau@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#619506}

Bug: chromedriver:1897
Change-Id: I38122bdc01965345421429b1d2f45374395b0cc7
Reviewed-on: https://chromium-review.googlesource.com/c/1394786
Reviewed-by: Caleb Rouleau <crouleau@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619717}
[modify] https://crrev.com/c368d9b6d129ff6b01d87b3ec840d7779010db7b/chrome/test/chromedriver/test/run_py_tests.py
[modify] https://crrev.com/c368d9b6d129ff6b01d87b3ec840d7779010db7b/chrome/test/chromedriver/window_commands.cc

Comment 28 by johnchen@chromium.org, Jan 11

Project Member
 Issue 2732  has been merged into this issue.

Comment 29 by bugdroid, Jan 31

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d461a3e4710ca320668b9f5cef9edc20ce00c22e

commit d461a3e4710ca320668b9f5cef9edc20ce00c22e
Author: John Chen <johnchen@chromium.org>
Date: Thu Jan 31 01:53:52 2019

[ChromeDriver] Implement Release Actions for keys

Add "input cancel list" to the session state, as required by W3C spec,
and use it to implement Release Actions command for keyboard actions.
Fixes WPT test webdriver/tests/release_actions/sequence.py, subtest
test_release_char_sequence_sends_keyup_events_in_reverse.

Bug: chromedriver:1897
Change-Id: I95893b08ad59d366806964b53ef2cbdbc117063f
Reviewed-on: https://chromium-review.googlesource.com/c/1435683
Reviewed-by: Lan Wei <lanwei@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#627735}
[modify] https://crrev.com/d461a3e4710ca320668b9f5cef9edc20ce00c22e/chrome/test/chromedriver/session.cc
[modify] https://crrev.com/d461a3e4710ca320668b9f5cef9edc20ce00c22e/chrome/test/chromedriver/session.h
[modify] https://crrev.com/d461a3e4710ca320668b9f5cef9edc20ce00c22e/chrome/test/chromedriver/window_commands.cc

Comment 30 by bugdroid, Feb 12

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/333197631d9e5878ac5a63b73fd3b4cd2e33d7cd

commit 333197631d9e5878ac5a63b73fd3b4cd2e33d7cd
Author: Lan Wei <lanwei@chromium.org>
Date: Tue Feb 12 18:03:42 2019

[ChromeDriver] Use Input.dispatchTouchEvent in ExecutePerformActions

when ChromeDriver dispatches touch events, it should use Devtool
protocol Input.dispatchTouchEvent to dispatch the touch events from
browser, which is very close to the native OS touch events and will
generate the correct gesture events.

Bug: chromedriver:1897
Change-Id: Id8ad22d5390609f7f2d4c68e77200b7e0ec46447
Reviewed-on: https://chromium-review.googlesource.com/c/1465169
Reviewed-by: John Chen <johnchen@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#631292}
[modify] https://crrev.com/333197631d9e5878ac5a63b73fd3b4cd2e33d7cd/chrome/test/chromedriver/chrome/ui_events.cc
[modify] https://crrev.com/333197631d9e5878ac5a63b73fd3b4cd2e33d7cd/chrome/test/chromedriver/chrome/ui_events.h
[modify] https://crrev.com/333197631d9e5878ac5a63b73fd3b4cd2e33d7cd/chrome/test/chromedriver/chrome/web_view_impl.cc
[modify] https://crrev.com/333197631d9e5878ac5a63b73fd3b4cd2e33d7cd/chrome/test/chromedriver/window_commands.cc

Comment 31 by bugdroid, Yesterday (34 hours ago)

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/68d5240e06f8bfcd711426c963dcb3432b631ff3

commit 68d5240e06f8bfcd711426c963dcb3432b631ff3
Author: Lan Wei <lanwei@chromium.org>
Date: Fri Feb 22 16:50:02 2019

[ChromeDriver] Set key modifiers with mouse actions

When we have keyboard events and mouse events send together, we should
keep the keys that we are pressing now and set them to the mouse events
that are in the same action sequence.

Bug: chromedriver:1897
Change-Id: I700d7a87d3d0a1b45c1588318ab21314aa284417
Reviewed-on: https://chromium-review.googlesource.com/c/1482009
Reviewed-by: John Chen <johnchen@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634700}
[modify] https://crrev.com/68d5240e06f8bfcd711426c963dcb3432b631ff3/chrome/test/chromedriver/window_commands.cc
[modify] https://crrev.com/68d5240e06f8bfcd711426c963dcb3432b631ff3/third_party/blink/web_tests/TestExpectations
[add] https://crrev.com/68d5240e06f8bfcd711426c963dcb3432b631ff3/third_party/blink/web_tests/external/wpt/infrastructure/metadata/infrastructure/testdriver/actions/actionsWithKeyPressed.html.ini
[add] https://crrev.com/68d5240e06f8bfcd711426c963dcb3432b631ff3/third_party/blink/web_tests/external/wpt/infrastructure/testdriver/actions/actionsWithKeyPressed.html

Sign in to add a comment