Web Automation Practice

Alerts, Prompts, and Confirms

Instructions: Your automation script should interact with each button and handle the corresponding browser dialog.

  1. Click "Show Alert" and accept the alert.
  2. Click "Show Confirm" and accept it (OK). Then click it again and dismiss it (Cancel).
  3. Click "Show Prompt", enter some text (e.g., "Automation"), and accept it.

Validation: The output box will show the result of your interactions with the confirm and prompt dialogs.

Output