Skip to content

← All questions

My page object needs a signed-in session before goto() — where does the login belong?

Asked 8,570 views2 answers

Every one of our scenarios opens with the same three steps: go to login, fill two fields, submit. Then the real scenario starts.

It is slow — about four seconds a scenario across roughly 200 scenarios — and it is the single biggest source of flakiness we have, because a failure in the login form fails everything. I have been tempted to put the login inside the page object's open() method, which feels wrong. What is the intended shape?

asked by Helle Borg352 ·

2 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