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

Function test_should_set_from_memory

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

Source from the content-addressed store, hash-verified

63
64
65async def test_should_set_from_memory(page: Page) -> None:
66 await page.set_content("<input type=file>")
67 file: FilePayload = {
68 "name": "test.txt",
69 "mimeType": "text/plain",
70 "buffer": b"this is a test",
71 }
72 await page.set_input_files(
73 "input",
74 files=[file],
75 )
76 assert await page.eval_on_selector("input", "input => input.files.length") == 1
77 assert (
78 await page.eval_on_selector("input", "input => input.files[0].name")
79 == "test.txt"
80 )
81
82
83async def test_should_emit_event(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