I'm a VERY new to Playwright and am trying to enable the trace. I am trying to follow the documentation but am receiving an error:
ERROR [100%] test setup failed page =
@pytest.fixture()
def set_up_tear_down(page) -> None:
browser = chromium.launch()
E NameError: name 'chromium' is not defined
conftest.py:7: NameError
Process finished with exit code 1
Any assistance would be appreciated.
conftest.py
import pytest
from playwright.sync_api import sync_playwright
@pytest.fixture()
def set_up_tear_down(page) -> None:
browser = chromium.launch()
context = browser.new_context()
# Start tracing before creating / navigating a page.
page.set_viewport_size({"width": 1536, "height": 800})
page.goto("google.com")
# Stop tracing and export it into a zip archive.
context.tracing.stop(path="trace.zip")
yield page