MCPcopy Index your code
hub / github.com/microsoft/playwright-python / on_dialog

Function on_dialog

tests/sync/test_sync.py:81–86  ·  view source on GitHub ↗
(dialog: Dialog)

Source from the content-addressed store, hash-verified

79
80def test_dialog_repr(page: Page) -> None:
81 def on_dialog(dialog: Dialog) -> None:
82 dialog.accept()
83 assert (
84 repr(dialog)
85 == f"<Dialog type={dialog.type} message={dialog.message} default_value={dialog.default_value}>"
86 )
87
88 page.on("dialog", on_dialog)
89 page.evaluate("alert('yo')")

Callers

nothing calls this directly

Calls 1

acceptMethod · 0.45

Tested by

no test coverage detected