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

Use static methods in page objects #11

Open
joaquimvila opened this issue Feb 7, 2022 · 0 comments
Open

Use static methods in page objects #11

joaquimvila opened this issue Feb 7, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@joaquimvila
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
BasePage class for this library requires consumers to create an instance of each page object that each test uses. That adds some boilerplate code on each test that could be avoided by use of the instance.

Describe the solution you'd like
Another base page class (i.e StaticBasePage) that provides similar methods as BasePage (byCSS, byId, allByCSS, ...), but all static. Thus, they all rely on a page ElementFinder provided by a protected abstract method.

This new pattern should be the one recommended by CSW guidelines about e2e tests. Consider removing the old BasePage in further versions of the library.

@joaquimvila joaquimvila added the enhancement New feature or request label Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant