-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
feat: add the page.touchscreen.swipe
method
#30587
Conversation
This comment has been minimized.
This comment has been minimized.
@microsoft-github-policy-service agree company="Bytedance" |
This comment has been minimized.
This comment has been minimized.
73669a1
to
534ed00
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
https://chromedevtools.github.io/devtools-protocol/tot/Input/#method-dispatchTouchEvent Implement it for chromium only since it could using dispatchTouchEvent to invoke scroll. Tried firefox but it doesn't work. Close microsoft#2903
https://chromedevtools.github.io/devtools-protocol/tot/Input/#method-synthesizeScrollGesture |
Test results for "tests 1"1 flaky27260 passed, 677 skipped Merge workflow run. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR! Unfortunately, we cannot make this a Chromium-only feature, it has to work in all three browser engines.
How about expose the Input.dispatchTouchEvent ? The firefox also implemented this CDP method. Just like the |
kindly ping @dgozman ;-) |
I am not really sure what you mean by "exposing Input.dispatchTouchEvent". Could you please elaborate?
Generally, Playwright APIs should be supported by chromium, firefox and webkit. |
Both the firefox and the chromium support this CDP method. I can submit another PR, create a Playwright method like
Currently Playwright already have a method , |
@PupilTong Thank you for the answers! If you believe that developers can implement As for compatibility, our goal is cross-browser support where possible. For example, we support Overall, the approach you take in this PR is a good one. Unfortunately, this feature most likely requires some work in the browser engines themselves, so it is not that straightforward to implement. As a workaround for now, we recommend using |
Thanks for your answer! Let me explain why the I'll spend some time for Firefox about this. For Safari, it seems they requires developers to use their emulator to test touch gestures. https://developer.apple.com/documentation/safari-developer-tools/inspecting-ios |
Let me archive this for now, please feel free to re-post and link to this PR. |
https://chromedevtools.github.io/devtools-protocol/tot/Input/#method-dispatchTouchEvent
Implement it for chromium only since it could using dispatchTouchEvent to invoke scroll.
Tried firefox but it doesn't work.
#2903