Skip to content

Add wheel source type to WebDriver Actions API Spec #1522

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

Merged
merged 10 commits into from
Aug 24, 2020

Conversation

LanWei22
Copy link
Contributor

@LanWei22 LanWei22 commented Jun 2, 2020

The current Webdriver Actions API’s pointer source types have three input types: "mouse", "pen", and "touch". For the three pointer type, it only supports actions of "pointerDown", "pointerUp", "pointerMove" and "pointerCancel". We cannot generate a mouse wheel scroll from the current source types and actions. We want to add a new source type to generate wheel events to support testing wheel scroll or zoom on web pages.

The design doc is
https://docs.google.com/document/d/1AzPkvexzuUJ1SF-6pZFpnn2lwEYlk3T0e-Wi52UWFZ4/

WPT tests:
https://cs.chromium.org/chromium/src/third_party/blink/web_tests/external/wpt/uievents/order-of-events/mouse-events/wheel-scrolling-manual.htm
https://cs.chromium.org/chromium/src/third_party/blink/web_tests/external/wpt/uievents/order-of-events/mouse-events/wheel-basic-manual.html


Preview | Diff

@AutomatedTester
Copy link
Contributor

AutomatedTester commented Jun 2, 2020 via email

@AutomatedTester
Copy link
Contributor

Please can you add tests to wpt or some other public version of those tests so we can review

@LanWei22 LanWei22 changed the title Update index.html Add wheel source type to WebDriver Actions API Spec Jun 3, 2020
@AutomatedTester
Copy link
Contributor

@Summerlw Are there tests for this change that we can view?

@LanWei22
Copy link
Contributor Author

@AutomatedTester
Copy link
Contributor

Yes, https://cs.chromium.org/chromium/src/third_party/blink/web_tests/external/wpt/uievents/order-of-events/mouse-events/wheel-scrolling-manual.html, I added them into PR description.

Do you mean these tests? They don't appear to be webdriver tests

@LanWei22
Copy link
Contributor Author

These are WPT tests. In order to write the Webdriver tests, I need to finish the implementation of adding the wheel source type. I will upload the implementation and Webdriver tests soon.

@AutomatedTester
Copy link
Contributor

AutomatedTester commented Jun 11, 2020 via email

@LanWei22
Copy link
Contributor Author

blueboxd pushed a commit to blueboxd/chromium-legacy that referenced this pull request Jul 29, 2020
We will add a new input source type to simulate the mouse wheel scroll
to the Webdriver Action API, w3c/webdriver#1522.

In this CL, we are adding the wheel input source in the ChromeDriver's
ExecutePerformActions function, which implements the Webdriver Action
API in Chrome and we will use Devtool's input protocol,
Input.dispatchMouseEvent with a type of "mouseWheel".


Bug: 1040611
Change-Id: Ieb46c24466b6149d9f398385652a5779b0fd2adf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2324972
Reviewed-by: John Chen <johnchen@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#792821}
T3-M4 pushed a commit to bayandin/chromedriver that referenced this pull request Jul 30, 2020
We will add a new input source type to simulate the mouse wheel scroll
to the Webdriver Action API, w3c/webdriver#1522.

In this CL, we are adding the wheel input source in the ChromeDriver's
ExecutePerformActions function, which implements the Webdriver Action
API in Chrome and we will use Devtool's input protocol,
Input.dispatchMouseEvent with a type of "mouseWheel".


Bug: 1040611
Change-Id: Ieb46c24466b6149d9f398385652a5779b0fd2adf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2324972
Reviewed-by: John Chen <johnchen@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#792821}
T3-M4 pushed a commit to bayandin/chromedriver that referenced this pull request Jul 30, 2020
This reverts commit 02649e9136a4ada9ddf13197161f088427d15af0.

Reason for revert: testActionsWheelScroll is consistently failing on Mac 10.14, I have added details on the CL itself.

Original change's description:
> Support Wheel input source in Action API
> 
> We will add a new input source type to simulate the mouse wheel scroll
> to the Webdriver Action API, w3c/webdriver#1522.
> 
> In this CL, we are adding the wheel input source in the ChromeDriver's
> ExecutePerformActions function, which implements the Webdriver Action
> API in Chrome and we will use Devtool's input protocol,
> Input.dispatchMouseEvent with a type of "mouseWheel".
> 
> 
> Bug: 1040611
> Change-Id: Ieb46c24466b6149d9f398385652a5779b0fd2adf
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2324972
> Reviewed-by: John Chen <johnchen@chromium.org>
> Commit-Queue: Lan Wei <lanwei@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#792821}

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

Change-Id: I38b43583a3c9b73c4d2024fe9f6d88e7e80cc57e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1040611
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2329165
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Commit-Queue: Balazs Engedy <engedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#793098}
blueboxd pushed a commit to blueboxd/chromium-legacy that referenced this pull request Jul 30, 2020
This reverts commit 02649e9.

Reason for revert: testActionsWheelScroll is consistently failing on Mac 10.14, I have added details on the CL itself.

Original change's description:
> Support Wheel input source in Action API
> 
> We will add a new input source type to simulate the mouse wheel scroll
> to the Webdriver Action API, w3c/webdriver#1522.
> 
> In this CL, we are adding the wheel input source in the ChromeDriver's
> ExecutePerformActions function, which implements the Webdriver Action
> API in Chrome and we will use Devtool's input protocol,
> Input.dispatchMouseEvent with a type of "mouseWheel".
> 
> 
> Bug: 1040611
> Change-Id: Ieb46c24466b6149d9f398385652a5779b0fd2adf
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2324972
> Reviewed-by: John Chen <johnchen@chromium.org>
> Commit-Queue: Lan Wei <lanwei@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#792821}

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

Change-Id: I38b43583a3c9b73c4d2024fe9f6d88e7e80cc57e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1040611
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2329165
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Commit-Queue: Balazs Engedy <engedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#793098}
blueboxd pushed a commit to blueboxd/chromium-legacy that referenced this pull request Aug 4, 2020
We will add a new input source type to simulate the mouse wheel scroll
to the Webdriver Action API, w3c/webdriver#1522.

In this CL, we are adding the wheel input source in the ChromeDriver's
ExecutePerformActions function, which implements the Webdriver Action
API in Chrome and we will use Devtool's input protocol,
Input.dispatchMouseEvent with a type of "mouseWheel".

I added some waiting time to wait for the action to be executed to fix
the failure on Mac 14 test.

TBR=johnchen@chromium.org

Bug: 1040611
Change-Id: I348c71bacc32b403ba995c1c736b6bfb230b65aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2337255
Reviewed-by: Lan Wei <lanwei@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#794706}
T3-M4 pushed a commit to bayandin/chromedriver that referenced this pull request Aug 5, 2020
We will add a new input source type to simulate the mouse wheel scroll
to the Webdriver Action API, w3c/webdriver#1522.

In this CL, we are adding the wheel input source in the ChromeDriver's
ExecutePerformActions function, which implements the Webdriver Action
API in Chrome and we will use Devtool's input protocol,
Input.dispatchMouseEvent with a type of "mouseWheel".

I added some waiting time to wait for the action to be executed to fix
the failure on Mac 14 test.

TBR=johnchen@chromium.org

Bug: 1040611
Change-Id: I348c71bacc32b403ba995c1c736b6bfb230b65aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2337255
Reviewed-by: Lan Wei <lanwei@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#794706}
Copy link
Member

@jgraham jgraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So regarding the input state; what are the use cases that require setting an x and y coordinate and scrolling at that point, and then scrolling again at the same point? It seems like without an equivalent of pointerMove it doesn't make much sense; we could just require providing start coordinates each time. Also the fact that the scroll wheel is conceptually distinct from the pointer in terms of position is interesting; is it a problem to model scrolling at a point without also getting related pointer events?

Copy link
Contributor

@AutomatedTester AutomatedTester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once James' comments are addressed we can see about merging

Copy link
Contributor Author

@LanWei22 LanWei22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, I looked at the "Perform a scroll", we actually do not need input state. I removed input state from the wheel input source. Please take a look at it again, thank you.

So regarding the input state; what are the use cases that require setting an x and y coordinate and scrolling at that point, and then scrolling again at the same point? It seems like without an equivalent of pointerMove it doesn't make much sense; we could just require providing start coordinates each time. Also the fact that the scroll wheel is conceptually distinct from the pointer in terms of position is interesting; is it a problem to model scrolling at a point without also getting related pointer events?

@AutomatedTester AutomatedTester dismissed jgraham’s stale review August 24, 2020 20:23

I believe all requested changes have been made

@AutomatedTester AutomatedTester merged commit f0c7bdf into w3c:master Aug 24, 2020
@AutomatedTester
Copy link
Contributor

@Summerlw You will need to move the tests into a directory that allows upstreaming of the tests

@LanWei22
Copy link
Contributor Author

Thank you very much for merging this PR for me, I will submit a PR for the Webdriver wheel tests and testdriver-actions.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants