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

Function test_should_work

tests/async/test_popup.py:287–293  ·  view source on GitHub ↗
(context: BrowserContext)

Source from the content-addressed store, hash-verified

285
286
287async def test_should_work(context: BrowserContext) -> None:
288 page = await context.new_page()
289 async with page.expect_popup() as popup_info:
290 await page.evaluate('window.__popup = window.open("about:blank")')
291 popup = await popup_info.value
292 assert await page.evaluate("!!window.opener") is False
293 assert await popup.evaluate("!!window.opener")
294
295
296async def test_should_work_with_window_features(

Callers

nothing calls this directly

Calls 3

new_pageMethod · 0.45
expect_popupMethod · 0.45
evaluateMethod · 0.45

Tested by

no test coverage detected