Skip to content

← All questions

A header widget appears on six pages — one page object per page, or something else?

Asked 9,210 views3 answers

Our header carries the cart badge, the account menu and a search box, and it is on six pages. Right now the cart badge locator is copy-pasted into six page objects, which was fine until the badge got a new test id and I had to fix it six times.

Splitting it out is obvious. What is not obvious is what the split looks like when the steps are decorators on classes that are registered per page.

asked by Nadia Belkacem8,611 ·

3 answers

Know the answer?

Reviewed before it appears. Wrap commands and output in triple backticks and they will render as a code block.

Have a different question? Ask it.

Related