Easy locator: id action: click

Native JS Confirm

A button triggers `window.confirm()` — accept or dismiss it and assert the result on the page.

Clicking the button below triggers a native window.confirm() dialog — accept or dismiss it, and the page reflects your choice.

Framework notes

  • cypress — Cypress auto-accepts native dialogs by default; use `cy.on('window:confirm')` to control the outcome.