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

Function test_owner_frame

tests/sync/test_element_handle.py:178–184  ·  view source on GitHub ↗
(page: Page, server: Server, utils: Utils)

Source from the content-addressed store, hash-verified

176
177
178def test_owner_frame(page: Page, server: Server, utils: Utils) -> None:
179 page.goto(server.EMPTY_PAGE)
180 utils.attach_frame(page, "frame1", server.EMPTY_PAGE)
181 frame = page.frames[1]
182 element_handle = frame.evaluate_handle("document.body").as_element()
183 assert element_handle
184 assert element_handle.owner_frame() == frame
185
186
187def test_owner_frame_for_cross_process_iframes(

Callers

nothing calls this directly

Calls 5

gotoMethod · 0.45
attach_frameMethod · 0.45
as_elementMethod · 0.45
evaluate_handleMethod · 0.45
owner_frameMethod · 0.45

Tested by

no test coverage detected