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

Playwright.Keyboard #31

Open
dbrody opened this issue Dec 14, 2021 · 2 comments
Open

Playwright.Keyboard #31

dbrody opened this issue Dec 14, 2021 · 2 comments

Comments

@dbrody
Copy link
Contributor

dbrody commented Dec 14, 2021

Before I dive in and try to push Keyboard features, anybody else work on this? I'd hate to duplicate effort. Also, if theres any pointers or suggestions, this would be a good way to track it.

@coreyti
Copy link
Member

coreyti commented Dec 15, 2021

It's a good question and request.

I had some trouble figuring out how I wanted to structure things when introducing Accessibility as a sub-resource of Page. The OO patterns in the other implementations don't translate seamlessly into our module/functional world.

Sometime after adding Accessibility, I added Locator. I'm pretty happy with that result. In particular:

  • Locator is its own, standalone module (which is also true for Accessibility).
  • Page.locator/2 returns an instance of Locator, with selectors scoped to the provided page.

I'd like to go back and make the Accessibility API be like Locator, while still scoping the module under the Page namespace (Accessibility is logically part of Page, while Locator might be associated with other resources).

I suggest that Keyboard should be a module under Page (there's already a placeholder file there) and be modeled after Locator.

@coreyti
Copy link
Member

coreyti commented Dec 15, 2021

Oh, to the "anybody else work on this?" question, not yet. Happy to have more of your contributions, @dbrody :)

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

No branches or pull requests

2 participants