BrauzerLab
← Back to missions 11 / 50

Dynamic IDs

Hard ~240 sec

In some applications, button id attributes change on every page load: uid-3821, uid-7934, uid-2901… Relying on those ids makes tests brittle.

Playwright’s semantic locators (getByRole, getByText, getByTestId) rely on stable, meaningful attributes. They find the right element even when the id changes.

page is already available. Locate and click the «Delete Account» button in the account settings panel without depending on its dynamic id.

TASK

Click the Delete Account button.

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

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