Demo practice website — this is a sandbox for learning QA & automation testing.
Level 6 · Browser Handling

Everything that leaves the DOM

Alerts, popups, permissions, downloads — the flows that trip up test frameworks the most.

#

Native alerts

  • alert: —
  • confirm: —
  • prompt: —

tipPlaywright: page.on('dialog', d => d.accept())

#

Multiple tabs / new window

Open API playground in new tab

tipAssert on the new context's URL.

#

Permissions

state: unknown

tipPlaywright: context.grantPermissions(['notifications'])

#

Downloads

tipPlaywright: waitForEvent('download')