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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Subscribe to arbitrary event bindings #2931
Comments
The Node.js implementation of Playwright does not support arbitrary events. Only "Playwright events" are supported here. They need to be manually dispatched from the browser side to the Node.js side, via e.g. exposeBinding. See a full list here of Playwright events on a Page instance. |
I see. Looking at the documentation for Is there a way around this? Or rather, to avoid an XY problem, is there any support for dragging a slider a certain number of paces to the left or the right? |
(It's designed to expose functions into the browser which when you call them (from the browser) get invoked on the Node.js side.) You could do something like that and wrap it inside a small function like we do in some of our tests: https://github.com/microsoft/playwright/blob/81e907f4c158502118e79f6045a115a50c4019d3/tests/library/inspector/cli-codegen-1.spec.ts#L754-L762 Does your element look like that?
|
Closing as part of the triage process since it seemed stale. Please create a new issue with a detailed reproducible or feature request if you still face issues. |
馃殌 Feature Request
The ability to subscribe to arbitrary events, which would parallel the node.js implementation of
page.on
/page.off
/page.once
Example
Motivation
I'm trying to implement a feature where I drag a slider a certain number of paces to the right. Playwright has support for dragging an element to another element, but not in an arbitrary direction. Seeing commentary in issues like microsoft/playwright#13109, I doubt support would be added for relative mouse coordinates.
Hence, I'm trying to do it manually, and I would like access to the raw
mousemove
event for this.The text was updated successfully, but these errors were encountered: