Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/microsoft/playwright-python
/ handle_dialog
Function
handle_dialog
tests/sync/test_browsercontext_events.py:117–120 ·
view source on GitHub ↗
(d: Dialog)
Source
from the content-addressed store, hash-verified
115
dialog: Optional[Dialog] = None
116
117
def
handle_dialog(d: Dialog) -> None:
118
nonlocal dialog
119
dialog = d
120
dialog.accept(
"hello"
)
121
122
page.context.on(
"dialog"
, handle_dialog)
123
Callers
nothing calls this directly
Calls
1
accept
Method · 0.45
Tested by
no test coverage detected