BrauzerLab
← Back to missions 34 / 50

Disambiguation Cookbook

Hard ~240 sec

The account settings page has three forms — Login, Billing, Shipping — each with an identically-named Save button. Your job is to click only the Billing form’s button.

A broad locator can find all three buttons and end up clicking the wrong first one. The correct strategy is the scoped locator technique — precisely select the parent container, then navigate to the button inside it.

page is ready. Each form has its own id and data-testid. Both the scoped locator, a direct id, and data-testid all work.

This mission proves you have a complete understanding of the scoped locator technique.

TASK

Use the disambiguation recipe.

Provided for you
import { test, expect } from '@playwright/test';

test('Disambiguation Cookbook', async ({ page }) => {
  await page.goto('https://lab.local/mission/disambiguation-cookbook');
  // ↓ Your code goes below ↓
});
Editor
https://lab.local/mission/disambiguation-cookbook
Loading...
Results will appear here — press Run or Check.