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

Function test_should_work

tests/async/test_input.py:55–62  ·  view source on GitHub ↗
(page: Page, assetdir: Path)

Source from the content-addressed store, hash-verified

53
54
55async def test_should_work(page: Page, assetdir: Path) -> None:
56 await page.set_content("<input type=file>")
57 await page.set_input_files("input", assetdir / "file-to-upload.txt")
58 assert await page.eval_on_selector("input", "input => input.files.length") == 1
59 assert (
60 await page.eval_on_selector("input", "input => input.files[0].name")
61 == "file-to-upload.txt"
62 )
63
64
65async def test_should_set_from_memory(page: Page) -> None:

Callers

nothing calls this directly

Calls 3

set_contentMethod · 0.45
set_input_filesMethod · 0.45
eval_on_selectorMethod · 0.45

Tested by

no test coverage detected