Open
Description
Description
When using Playwright MCP, if a browser_click action triggers a native browser dialog (alert, confirm, prompt), the call currently hangs until the dialog is handled. There is no way for the client to know that a dialog appeared, nor to retrieve its type or message for conditional handling.
Proposal
- When browser_click triggers a dialog, the response should immediately indicate:
- That a dialog appeared
- The dialog type (alert, confirm, prompt)
- The dialog message text
- This would allow clients to implement conditional logic based on the dialog content, and avoid indefinite hangs.
Steps to Reproduce
- Use browser_click to click a button that triggers a native dialog.
- Observe that the call hangs and no dialog information is returned.
Expected Behavior
- browser_click should return a response indicating a dialog appeared, with its type and message, instead of hanging.
Actual Behavior
- browser_click hangs until the dialog is handled, and no dialog information is available to the client.
Environment
- Playwright MCP version:0.0.29
Additional Context
This enhancement would make it possible to automate workflows that require conditional dialog handling, and improve robustness of MCP-based browser automation.
Metadata
Metadata
Assignees
Labels
No labels