MCPcopy Create free account
hub / github.com/microsoft/playwright-python / test_should_work_with_empty_url

Function test_should_work_with_empty_url

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

Source from the content-addressed store, hash-verified

364
365
366async def test_should_work_with_empty_url(context: BrowserContext) -> None:
367 page = await context.new_page()
368 async with page.expect_popup() as popup_info:
369 await page.evaluate("() => window.__popup = window.open('')")
370 popup = await popup_info.value
371 assert await page.evaluate("!!window.opener") is False
372 assert await popup.evaluate("!!window.opener")
373
374
375async def test_should_work_with_noopener_and_no_url(context: BrowserContext) -> None:

Callers

nothing calls this directly

Calls 3

new_pageMethod · 0.45
expect_popupMethod · 0.45
evaluateMethod · 0.45

Tested by

no test coverage detected