Skip to content
Target QATargetQA

Playwright JavaScript Alerts, Popups & Dialogs Automation Labs

Practice interacting with JavaScript alerts, confirm modals, prompts (sending keys), modal dialogs, and native browser events without crashing your test runner.

Playwright · JavaScript
Challenges
111
Websites
10
Progress
—

Sign in to run, submit and track progress. Guests can browse and read every challenge.

Sign in
Showing 6 of 6 matching · 111 total
  1. Alerts & Native Dialogs#046SkyWay

    Handle the same-city search alert

    Search for a flight from Bengaluru to Bengaluru, handle the native alert that rejects the search, and verify the error shown on the page afterwards.

    • Native alerts
    • Autocomplete
    • Error messages
    Easy 10m30 pts
    Solve
  2. Alerts & Native Dialogs#054SkyWay

    Dismiss, then accept, the cancel booking confirmation

    Find booking SW7K2Q, click Cancel booking and dismiss the confirmation to keep it, then cancel again and accept to cancel it for real.

    • Confirm dialogs
    • Dismiss vs accept
    • State changes
    Medium 15m50 pts
    Solve
  3. Alerts & Native Dialogs#055SkyWay

    Send the e-ticket through a prompt dialog

    On the booking page for SW7K2Q, click Email e-ticket, type a new email address into the native prompt, and verify the page confirms where the ticket was sent.

    • Prompt dialogs
    • Dialog input
    • Assertions
    Medium 10m45 pts
    Solve
  4. Alerts & Native Dialogs#057FoodRush

    Set the delivery area through a native prompt

    FoodRush asks for your delivery area in a native browser prompt. Enter “Indiranagar” and accept it, then open the prompt again and dismiss it, and verify the header keeps the area and the page explains that the location did not change.

    • Native prompt
    • Accept vs dismiss
    • Typing into a prompt
    Medium 15m50 pts
    Solve
  5. Alerts & Native Dialogs#062FoodRush

    Handle the switch-restaurant confirm dialog

    Your cart holds items from Dosa Darbar. Adding a dish from Biryani Baithak opens a native confirm dialog. Cancel it once and check the cart is kept, then add again, accept, and verify a new cart was started.

    • Native confirm
    • Accept vs dismiss
    • State after dialogs
    Medium 15m55 pts
    Solve
  6. Alerts & Native Dialogs#074FinBank

    Cancel a transfer at the browser confirm dialog

    Prepare a ₹5,000 transfer to Rahul Mehta, then dismiss the browser confirm dialog and verify the transfer was cancelled without debiting the account.

    • Native confirm dialogs
    • Dialog handling
    • Negative paths
    Medium 15m50 pts
    Solve

FAQ

Playwright JavaScript Alerts, Popups & Native Dialogs FAQ

How do I practice Alerts, Popups & Native Dialogs in Playwright with JavaScript?

Choose any challenge below, write your Playwright test script in JavaScript, and execute it against our realistic mock websites. TargetQA tests your code in isolated cloud browsers and checks each acceptance step automatically.

What scenarios are included in the Alerts, Popups & Native Dialogs labs?

Practice interacting with JavaScript alerts, confirm modals, prompts (sending keys), modal dialogs, and native browser events without crashing your test runner.