Skip to content

← All questions

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

Example threads. These questions and answers were written by the SDODS team to document real problems and how to fix them. The people named are illustrative, not real users. Questions asked on this site are marked new.

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?

2 answers

Know the answer?

Wrap commands and output in triple backticks and they will render as a code block.

Checking whether you’re signed in…

Have a different question? Ask it.

Related