Skip to content

healenium/healenium-example-playwright-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Healenium Example - Playwright Python

Tests using Playwright for Python and pytest.

Setup

First time only (create venv and install deps):

cd healenium-example-playwright-python
python3 -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install -r requirements.txt
playwright install chromium

Every new terminal (only activate the venv):

cd healenium-example-playwright-python
source .venv/bin/activate
pytest -v

(Optional) Connect to Healenium proxy: set PLAYWRIGHT_SERVER_URL to your WebSocket endpoint (default: ws://localhost:8095/hlm-playwright-proxy).

Running tests

  • Run all tests (requires Healenium/remote browser or local Chromium):

    pytest
  • Run with verbose output:

    pytest -v
  • Run only tests that are not marked slow:

    pytest -m "not slow"
  • Run a specific test file:

    pytest tests/test-env/playwright-specific/test_get_by.py -v

Project structure

  • conftest.py – Pytest/Playwright config: connect_options (WebSocket to Healenium), timeouts.
  • tests/test-env/playwright-specific/ – Locator API tests (getBy, chain, iframe, actions, expect, etc.).
  • tests/test-env/selenium-like-locator-api/ – Locator-based tests (CSS, XPath, simple, general, parent-child).
  • tests/test-env/selenium-like-page-api/ – Page API tests using query_selector (ElementHandle-style).

Tests target the same Healenium test env URL as the Node.js example: https://healenium.github.io/healenium-test-env/index.html.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages