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

Function test_should_work

tests/async/test_focus.py:20–24  ·  view source on GitHub ↗
(page: Page)

Source from the content-addressed store, hash-verified

18
19
20async def test_should_work(page: Page) -> None:
21 await page.set_content("<div id=d1 tabIndex=0></div>")
22 assert await page.evaluate("() => document.activeElement.nodeName") == "BODY"
23 await page.focus("#d1")
24 assert await page.evaluate("() => document.activeElement.id") == "d1"
25
26
27async def test_should_emit_focus_event(page: Page) -> None:

Callers

nothing calls this directly

Calls 3

set_contentMethod · 0.45
evaluateMethod · 0.45
focusMethod · 0.45

Tested by

no test coverage detected