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

Is there a PageElement class, rather than PageObject? #2469

Closed
john-caleb-phillips opened this issue May 26, 2021 · 1 comment
Closed

Is there a PageElement class, rather than PageObject? #2469

john-caleb-phillips opened this issue May 26, 2021 · 1 comment

Comments

@john-caleb-phillips
Copy link

I am currently working with Serenity using PageObject and ScenarioSteps files, not the Screenplay pattern.

In my project I have several reusable elements are appear on various pages. There are the obvious header, footer, and sidebar objects that lots of sites have, but also a few others that are specific to my project. I am unsure what class these reusable page elements should inherit from. I don't want to have them inherit from ScenarioSteps, since they contain no steps. I also do not want them to inherit from PageObject, since it contains many methods that do not apply to these elements. Methods such as open() and callWhenPageOpensMethods() come to mind.

Is there a class that these reusable elements can inherit from that is lighter than the PageObject class, but semantically different from the ScenarioSteps class?

@wakaleo
Copy link
Member

wakaleo commented May 27, 2021

Not currently, but it is a good idea and I had in mind adding a class like this in a future version.

@wakaleo wakaleo closed this as completed Feb 12, 2022
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