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
[Feature] Support for touch events/gestures #2903
Comments
It would also be interesting a feature to tap on certain elements or coordinates as Puppeteer allowed. |
+swipe |
+for swipe |
+1 swipe |
is there some quick-access to achieve touch move in mobile, etc popup picker |
Having the ability to swipe, dragto, or even replicate the mouse class for touchscreen would be great. If I could use the touchscreen class to move, press down, move, and unpress, it would take care of a lot of issues that I'm currently having with dragging elements. |
+1 for swipe action |
+1 for overall possibility to automate touch |
1 similar comment
+1 for overall possibility to automate touch |
+1 for native mobile gestures like swipe |
Is this experimental API (https://playwright.dev/docs/api/class-androidinput) an attempt to implement this feature? I didn't test it yet. |
+swipe Tried a workaround with Touchevent, but I'm getting two touch points on the start and the end coordinates. Probably I messed up something.
|
+1 for simulating long press on mobile device |
damn this is really needed. Please implement this :) |
+1 for swipe/touch events please :) |
+1 for swipe |
2 similar comments
+1 for swipe |
+1 for swipe |
+1 for all mobile gestures |
+1 swipe! |
playwright devs lazy as fuk, still not added after 3 years |
+1 |
+1 for simulating long press on mobile device |
+1 |
+1 for swipe/touch |
Wasn't this requirement raised three years ago? Are you really not planning to do it? After all, Selenium supports it. |
+1 swipe |
Tried on chrome 124, Windows 10. |
it('should work on scroll container', async ({ page, server }) => {
const client = await page.context().newCDPSession(page);
await page.setContent(`<div id="container" style="width: 500px; height: 500px; overflow-y:scroll;"><div style="width:100%; height:200%;"></div></div>`);
await client.send('Input.synthesizeScrollGesture', {
x: 10,
y: 200,
xDistance: 0,
yDistance: -100,
preventFling: true
})
expect(await page.$eval('#container', e => e.scrollTop)).toBe(100);
}); |
https://chromedevtools.github.io/devtools-protocol/tot/Input/#method-synthesizeScrollGesture This is a wrapper of this CDP method. Currently the Firefox and the Safari are not yet implement is method. Close microsoft#2903
https://chromedevtools.github.io/devtools-protocol/tot/Input/#method-synthesizeScrollGesture This is a wrapper of this CDP method. Currently the Firefox and the Safari are not yet implement is method. Close microsoft#2903
I've submitted a PR for the page.touchscreen.swipe. |
https://chromedevtools.github.io/devtools-protocol/tot/Input/#method-synthesizeScrollGesture This is a wrapper of this CDP method. Currently the Firefox and the Safari are not yet implement this method. Close microsoft#2903
https://chromedevtools.github.io/devtools-protocol/tot/Input/#method-synthesizeScrollGesture This is a wrapper of this CDP method. Currently the Firefox and the Safari are not yet implement this method. Close microsoft#2903
https://chromedevtools.github.io/devtools-protocol/tot/Input/#method-synthesizeScrollGesture This is a wrapper of this CDP method. Currently the Firefox and the Safari are not yet implement this method. Close microsoft#2903
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-dispatchTouchEvent Implement it for chromium only since it could using dispatchTouchEvent to invoke scroll. Tried firefox but it doesn't work. Close microsoft#2903
Web apps running on touch devices (e.g, mobile and Surface) rely on touch gestures like swiping and pinching to zoom. While
page.dispatchEvent
can manufacture synthetic touch points, having a simpler API would improve the dev experience.Scenarios
The text was updated successfully, but these errors were encountered: