Skip to content

Bug: dialog blocks snapshot #595

Open
@route250

Description

@route250

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

  1. Use browser_click to click a button that triggers a native dialog.
  2. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions