Open dbrody opened 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:
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
.
Oh, to the "anybody else work on this?" question, not yet. Happy to have more of your contributions, @dbrody :)
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.