Playwright test automation project for nop-qa.portnov.com e-commerce site testing.
git clone https://github.com/EllieSky/Playwright_Spring2026.git
cd Playwright_Spring2026pip install -r requirements.txtplaywright installpytestpytest tests/test_login_logout.pypytest -vvpytest --headedMobile tests use the @pytest.mark.mobile marker and require the MOBILE environment variable to be set.
export MOBILE="iPhone 15" && pytest -m "mobile" tests/test_mobile_categories_view.py -vvCommon Playwright device names include:
- iPhone 15
- iPhone 14
- iPhone 13
- iPad Pro
- iPad (gen 11)
- Pixel 5
- Galaxy S9
The project uses pytest markers to categorize tests:
@pytest.mark.mobile- Tests that run on mobile devices@pytest.mark.desktop-only- Tests that only run in full browser window
Run tests by marker:
pytest -m mobile
pytest -m "not mobile"
pytest -m desktop-onlytests/- Test filesmenus/- Page object classes (UserMenu, HeaderMenu)fixtures/- Pytest fixtures (menu, new_user, extended_page)conftest.py- Pytest configuration and fixturesconfig.py- Centralized configurationpytest.ini- Pytest settings and markers