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

Function test_should_dismiss_the_prompt

tests/async/test_dialog.py:48–57  ·  view source on GitHub ↗
(page: Page)

Source from the content-addressed store, hash-verified

46
47
48async def test_should_dismiss_the_prompt(page: Page) -> None:
49 result = []
50
51 async def on_dialog(dialog: Dialog) -> None:
52 result.append(True)
53 await dialog.dismiss()
54
55 page.on("dialog", on_dialog)
56 assert await page.evaluate("prompt('question?')") is None
57 assert result
58
59
60async def test_should_accept_the_confirm_prompt(page: Page) -> None:

Callers

nothing calls this directly

Calls 2

onMethod · 0.45
evaluateMethod · 0.45

Tested by

no test coverage detected