Skip to content

Add fancy input APIs #40

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

Closed
paulirish opened this issue Jun 27, 2017 · 2 comments
Closed

Add fancy input APIs #40

paulirish opened this issue Jun 27, 2017 · 2 comments
Assignees
Labels

Comments

@paulirish
Copy link
Contributor

paulirish commented Jun 27, 2017

.mouseMoved(x, y, options = {})
.mousePressed(x, y, options = {})
.mouseReleased(x, y, options = {})
.tap(x, y, options = {})
.touchmove()
.touchend()
@aslushnikov aslushnikov changed the title Add Input APIs Add fancy input APIs Jun 27, 2017
@aslushnikov aslushnikov added this to the v0.1 milestone Jul 18, 2017
@JoelEinbinder JoelEinbinder mentioned this issue Jul 21, 2017
aslushnikov pushed a commit that referenced this issue Jul 22, 2017
This patch:
- adds Mouse class which holds mouse state and implements mouse primitives,
such as moving, button down and button up.
- implements high-level mouse api, such as `page.click` and `page.hover`.

References #40, References #89
@JoelEinbinder
Copy link
Contributor

JoelEinbinder commented Jul 25, 2017

For tapping:
Input.synthesizeTapGesture appears to only work on android
Input.dispatchTouchEvent doesn't click events like normal tapping would
Input.emulateTouchFromMouseEvent fires mouse events, but only after an undefined delay.

The best way to emulate touch right now appears to be setting the device mode to iPhone, which sends touchStart and touchEnd along with every mouse press.

@JoelEinbinder
Copy link
Contributor

Closing this in favor of smaller issues

#156
#157
#158

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

No branches or pull requests

3 participants