BrauzerLab
← Back to missions 12 / 50

Disambiguate Table Rows

Hard ~240 sec

The user management table has three rows — each with an identical-looking «Delete» button. You must click only the button in the «Əli Həsənov» row.

To disambiguate table rows, use row filtering (filter({ hasText })): first narrow down to the right row, then use getByRole to reach its button. In real Playwright, chain .filter({ hasText }) to find the row, then .getByRole('button') to get the button.

page is already available.

This approach is the most reliable way to distinguish table rows that have no unique id.

TASK

Click the Delete button in the «Əli Həsənov» row.

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

test('Disambiguate Table Rows', async ({ page }) => {
  await page.goto('https://lab.local/mission/table-row-by-text');
  // ↓ Your code goes below ↓
});
Editor
https://lab.local/mission/table-row-by-text
Loading...
Results will appear here — press Run or Check.