BrauzerLab
← Back to missions 39 / 50

Enabled / Disabled

Medium ~180 sec

The form has two buttons: “Save” is enabled and “Submit” is disabled. Your job: use expect to assert that the “Submit” button is disabled.

Playwright provides two separate assertion methods for checking an element’s enabled state — one for enabled, the other for disabled. This is a more reliable approach than manually checking the disabled attribute.

The page object is already available. Find the “Submit” button and assert its state.

You can locate the button by id, data-testid, or getByRole — all are accepted.

TASK

Assert whether the button is active or not.

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

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