Error trying to enable trace in conftest.py Aloha all. I recently started using Playwright at my job in Hawaii. I watched a youtube video on POM and have a few pages developed in Python. I am wondering if the conftest.py file is the correct place to add the trace? 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("https://trainingforms.hawaiianelectric.com")
When I start my test I receive this error: ERROR [100%] test setup failed page =
E NameError: name 'chromium' is not defined conftest.py:7: NameError Process finished with exit code 1
Mahalo (Thank you)!
This thread is trying to answer question "Is the conftest.py file the correct place to add the trace in Python using Playwright?"
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].