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

Function test_should_emit_event

tests/async/test_input.py:83–93  ·  view source on GitHub ↗
(page: Page)

Source from the content-addressed store, hash-verified

81
82
83async def test_should_emit_event(page: Page) -> None:
84 await page.set_content("<input type=file>")
85 fc_done: asyncio.Future = asyncio.Future()
86 page.once("filechooser", lambda file_chooser: fc_done.set_result(file_chooser))
87 await page.click("input")
88 file_chooser = await fc_done
89 assert file_chooser
90 assert (
91 repr(file_chooser)
92 == f"<FileChooser page={file_chooser.page} element={file_chooser.element}>"
93 )
94
95
96async def test_should_work_when_file_input_is_attached_to_dom(page: Page) -> None:

Callers

nothing calls this directly

Calls 3

set_contentMethod · 0.45
onceMethod · 0.45
clickMethod · 0.45

Tested by

no test coverage detected