Handle Prompt Dialog
A prompt dialog accepts text input. Use dialog.accept(text) to enter text and click OK.
On the Alerts page, clicking "Show Prompt" triggers a prompt. The page shows You entered: followed by your text in #promptResult.
Task:
- Navigate to
https://testkru.com/Interactions/Alerts - Set up handler to type "Playwright" and accept
- Click "Show Prompt"
- Print the result text from
#promptResult
Expected output:
Prompt response: You entered: Playwright
TestKru