Skip to content
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

Consider adding user.mouse and user.keyboard from pptr to user object #170

Open
calebeby opened this issue Jul 20, 2021 · 0 comments
Open
Labels

Comments

@calebeby
Copy link
Member

calebeby commented Jul 20, 2021

The user object started out as trying to copy user-event’s API, with the underlying code calling pptr methods. Each function performs additional checks that pptr does not (i.e. user.click won’t click on elements that are hidden, covered, etc.).

user.mouse and user.keyboard aren’t in user-event. I was reluctant to stray from their API. I am not opposed to it but so far we haven’t diverged at all.

If we were to put the user.mouse and user.keyboard methods in Pleasantest, there are several options of how to do it:

  • Call pptr methods directly, no changes
  • Call them with a small wrapper with the forgot-await detection and parameter runtime typechecking
  • Call them with a larger wrapper that also does more types of checks (along the lines of the checks I mentioned for user.click, but I’m not sure what that would look like for page.keyboard and page.mouse)
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

1 participant