Locator Basics

Each card is a mini interview prompt. Try to solve each one using a semantic locator first. Then write an XPath fallback.

Challenge 1: Click “Save” (unique role + name)

Goal: click the Save button and assert the status reads Saved.

Not saved

Challenge 2: Click the correct “Save” (duplicate text)

Goal: click the Save button inside the “Profile” panel, not the “Billing” panel.

Profile
Not saved
Billing
Not saved

Challenge 3: Fill “Email” (label-based)

Goal: fill the Email field with any value.

Challenge 4: Select “State” (select + options)

Goal: choose “Arkansas” from the State dropdown.

Challenge 5: Check the right checkbox (same label text twice)

Goal: check “Send alerts” under Notifications (not under Marketing).

Notifications
Marketing

Challenge 6: Table row action

Goal: Click “View” for the row where Name is “Nina Patel”.

Name Role Action
Alex Morgan Owner View
Nina Patel Editor View
Jordan Lee Viewer View