mechanical-orchard / playwright-elixir

An Elixir library for Playwright web automation
MIT License
119 stars 23 forks source link

Playwright.Keyboard #31

Open dbrody opened 2 years ago

dbrody commented 2 years ago

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 commented 2 years ago

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:

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 commented 2 years ago

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