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

Function test_should_start_and_stop_har

tests/async/test_tracing.py:395–406  ·  view source on GitHub ↗
(
    browser: Browser, server: Server, tmp_path: Path
)

Source from the content-addressed store, hash-verified

393
394
395async def test_should_start_and_stop_har(
396 browser: Browser, server: Server, tmp_path: Path
397) -> None:
398 context = await browser.new_context()
399 page = await context.new_page()
400 har_path = tmp_path / "test.har"
401 await context.tracing.start_har(path=har_path, content="embed", mode="full")
402 await page.goto(server.PREFIX + "/empty.html")
403 await context.tracing.stop_har()
404 await context.close()
405 assert har_path.exists()
406 assert har_path.stat().st_size > 0
407
408
409async def test_should_record_a_har_with_options(

Callers

nothing calls this directly

Calls 6

new_contextMethod · 0.45
new_pageMethod · 0.45
start_harMethod · 0.45
gotoMethod · 0.45
stop_harMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected