microsoft / playwright-test

Build a cross-browser end-to-end test suite with Playwright.
https://playwright.dev
Apache License 2.0
777 stars 34 forks source link

Run 'pytest-playwright': No module named 'playwright.main' #193

Closed AtuboDad closed 3 years ago

AtuboDad commented 3 years ago

version: playwright 0.162.2 pytest-playwright 0.0.9 error msg: Traceback (most recent call last): File "D:/workspaces/openspaces/playwright-python/venv/Lib/site-packages/pytest_playwright/pytest_playwright.py", line 23, in from playwright.main import SyncPlaywright ModuleNotFoundError: No module named 'playwright.main'

playwright.main has already rename to _main.

mxschmitt commented 3 years ago

Are you using the Playwright Python version from PIP? Seems like on PIP these rename was not yet released, so I can't reproduce it yet. But yes it needs to be fixed as soon as a new Playwright Python version will get released.

mxschmitt commented 3 years ago

@ASAS1314 version 0.0.10 of pytest-playwright got released which fixes that issue. Thanks for reporting!