Selenium WebDriver 4

Enter text into a prompt dialog

Medium70 pts~25 min
  • Prompt dialogs
  • Alerts
Practice app · UI Widgets Lab

Native alerts, confirm and prompt dialogs, a modal, a cookie banner, custom dropdown, autocomplete, date picker and tooltip.

Test URL
/lab/selenium-enter-text-into-a-prompt-dialog

Your starter code already declares TEST_URL — never hardcode a host.

Objective

Type into a native prompt and verify the app received the value.

Your task

  1. 1Open TEST_URL and click #prompt-button.
  2. 2Switch to the prompt and assert its text is “What is your name?”.
  3. 3Send “Ada” to the prompt and accept it.
  4. 4Assert #prompt-result shows “Hello, Ada!”.

Acceptance criteria

  • Text is sent to the prompt
  • #prompt-result shows “Hello, Ada!”
  • At least 2 assertions pass

Selenium WebDriver 4 · Selenium · Dropdowns, alerts & popups