A high-efficiency UI automation framework based on Playwright
Project description
pwauto
A high-efficiency UI automation testing framework based on Playwright and pytest.
Built to reduce the boilerplate of UI automation with enterprise-grade features out of the box.
🌟 Key Features
- Global Auto-Login: Log in just once per test session. Authentication state is automatically saved (
state.json) and instantly reused across all subsequent tests. - Smart Failure Traces: Automatically saves Playwright Traces (DOM snapshots, network requests, console logs, and videos) upon test failure, seamlessly attaching them to your Allure reports.
- Out-of-the-Box Fixtures:
page: Ready-to-use page fixture injected with global authenticated state.guest_page: Clean, unauthenticated page fixture for testing login/registration flows.
- Environment & Data Driven: Built-in support for multiple
.envenvironments and JSON-based data-driven testing. - Feishu (Lark) Integration: Automatically sends elegant test execution summary cards to your Feishu group upon completion.
📦 Installation
pip install pwauto
playwright install chromium
🚀 Quick Start
1. Create a Page Object
from pwauto.core.base import BasePage
class MyPage(BasePage):
def open(self):
self.navigate("/my-path")
def submit(self):
self.click('role=button[name="Submit"]', name="Click Submit Button")
2. Write a Test
Just request the page fixture (comes with authenticated state):
def test_my_feature(page):
my_page = MyPage(page)
my_page.open()
my_page.submit()
3. Run and Report
# Run tests for production environment
pytest --env dev
# View Allure report with attached failure traces
allure serve ./reports/allure-results
Note: For detailed project structure, configuration, and advanced usage, please refer to the complete README in the GitHub repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pwauto-0.1.3.tar.gz.
File metadata
- Download URL: pwauto-0.1.3.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
007119d745bdd66f51b998eeedb57a4cf1564c513360ff8dc0826966ac5e8d1a
|
|
| MD5 |
e0ebf18792db1de557e629dcea19dd3b
|
|
| BLAKE2b-256 |
3156c21281f7fa51f8789642dd1ea9a1f1c58758a7c02114c08936c89a655cad
|
File details
Details for the file pwauto-0.1.3-py3-none-any.whl.
File metadata
- Download URL: pwauto-0.1.3-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccf7416b4fa94df1d41630cfcd8e89a63ca4127a3d267f62c79ce98dea23cbcc
|
|
| MD5 |
6730f9238785cf45df853f73b54fba80
|
|
| BLAKE2b-256 |
63e522ec3106cfaeaccc64417ca4cbef359eecb826f92f6d1aadb98015bd1ab2
|