playwright
playwright copied to clipboard
[Feature] Support for Pen pointer type for chromium
For testing Pen based web feature currently there is no support in playwright. There is no way we can simulate Pen interaction like we can do for mouse. There is a provision from dev tools to pass the pointerType. Currently the default value is used which is mouse.
pointerType string Pointer type (default: "mouse"). Allowed Values: mouse, pen
Request: Add a Pen pointer type support either as an optional parameter in existing mouse or a set of new Pen api.
Expectation: Support for Pen pointer type So that Pen only web feature can be tested
This looks like a niche feature that will only affect a small fraction of the users. I am leaving it open with collecting feedback label to collect the upvotes.
This is one of the major issues in terms of experience for pen users and would help to enhance the overall pen user experience as web being one of the most widely platform where we access lot of such solutions.
Hi, I'd like to bump this topic as I have similar problem: I need to write a test to responsive web app which in mobile view has Carousel of items, so I need todo a right/left swipes. I have next code:
const bb = await this.swiper.boundingBox();
// get the center position of active card
const center = { x: bb!.x + bb!.width / 2, y: bb!.y + bb!.height / 2 };
// move the mouse to center (x,y)
await this.page.mouse.move(center.x, center.y);
// hold the mouse down
await this.page.mouse.down();
// move the mouse to destination
await this.page.mouse.move(center.x + (reverse ? 200 : -200), center.y, { steps: 100 });
// release the mouse
await this.page.mouse.up();
this code does not work (actually it select text in the card instead of swipe the card) as application handles/dispatches pointermove event only during the swipe and mouse.move() dispatches mousemove event only due to documentation.
Also tried with .dragTo() function with no success as it also uses mouse events.
@pavelfeldman is there any plans to implement pointer events support (same as for mouse events)? Thanks!
Why was this issue closed?
Thank you for your involvement. This issue was closed due to limited engagement (upvotes/activity), lack of recent activity, and insufficient actionability. To maintain a manageable database, we prioritize issues based on these factors.
If you disagree with this closure, please open a new issue and reference this one. More support or clarity on its necessity may prompt a review. Your understanding and cooperation are appreciated.