IntermediatePW-DLG-00225 minutesPlaywright

Submit a browser prompt

A prompt captures a synthetic release label.

  • dialogs
  • events

Objective

What to automate

Fill the prompt and verify the page echoes the supplied value.

Preconditions and test data

Preconditions

  • Use a fresh isolated Practice Lab browser context.
  • Open the fixture identified by FX-DIALOG-001.

Test data

  • prompt value: release-55

Expected result

The visible prompt result contains release-55.

Progressive hints

Hint 1

Register page.once(dialog) before the click.

Hint 2

Check dialog.type() is prompt.

Hint 3

Call accept with the supplied value.

I’ve tried it — show solution
  1. Register page.once(dialog) before the click.
  2. Check dialog.type() is prompt.
  3. Call accept with the supplied value.