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

Function test_expect_file_chooser

tests/sync/test_input.py:22–29  ·  view source on GitHub ↗
(page: Page)

Source from the content-addressed store, hash-verified

20
21
22def test_expect_file_chooser(page: Page) -> None:
23 page.set_content("<input type=file></input>")
24 with page.expect_file_chooser() as fc_info:
25 page.click('input[type="file"]')
26 fc = fc_info.value
27 fc.set_files(
28 {"name": "test.txt", "mimeType": "text/plain", "buffer": b"Hello World"}
29 )
30
31
32def test_set_input_files_should_preserve_last_modified_timestamp(

Callers

nothing calls this directly

Calls 4

set_contentMethod · 0.45
expect_file_chooserMethod · 0.45
clickMethod · 0.45
set_filesMethod · 0.45

Tested by

no test coverage detected