Ctrl K
QA · Mid-level · Coding

There's a login page: an email field, a password field, a 'Sign in' button and an error message block; after a successful login, the profile page opens. Write a page object for this form and two tests using it: a successful login and a login with a wrong password.

~15 min by voice

How to approach it

This checks whether you can build maintainable UI automation: keep locators and actions in a page object and checks in the tests, choose robust selectors, rely on auto-waiting instead of sleep, and verify a meaningful result rather than just the fact that a click happened.

Have you seen this question in a real interview?
Answers0
Avg. score—
Strong—
Practiced0
Topics
Similar questionsWhat problems with the Page Object pattern have you run into on a large project, and how did you solve them? SeniorWhat is the Page Object pattern, and why is it used in UI test automation? JuniorWhy do UI test suites use the Page Object pattern, and what problems come up with it as the project grows? Mid-level

Answer by voice

The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.

Sign in to answer

Best with headphones · ~15 min