this_file: README.md
PlaywrightAuthor
PlaywrightAuthor gives Python Playwright scripts a persistent, authenticated Chrome for Testing browser.
It finds or installs Chrome for Testing, launches it with a persistent user profile and Chrome DevTools Protocol port, and returns a normal Playwright Browser. You log in once in the visible browser; later scripts reuse the same cookies and local browser state.
from playwrightauthor import Browser
with Browser(profile="google-primary", service="Gemini") as browser:
page = browser.get_page()
page.goto("https://gemini.google.com/")
print(page.title())
Install
uv add playwrightauthor
npx @puppeteer/browsers install chrome@stable
The package uses Chrome for Testing, not a normal Chrome user profile. Multiple profiles can run at the same time because each profile receives a stable CDP debug port.
First sign-in (once per profile)
playwrightauthor run --profile google-primary --service Gemini
A visible Chrome window opens. Sign in. The session is saved to the profile directory and reused on every subsequent script run.
CLI
playwrightauthor run --profile google-primary --service Gemini
playwrightauthor run --profile google-secondary --service NotebookLM
playwrightauthor status --profile google-primary
playwrightauthor profile list
playwrightauthor profile show --name google-primary
When a browser opens for sign-in, consent, captcha, or another manual step, PlaywrightAuthor shows a small dialognano prompt describing the service, profile, and task. Suppress it from Python with suppress_dialog=True or from the CLI with --suppress-dialog.
Python API
from playwrightauthor import Browser, AsyncBrowser
with Browser(profile="work", suppress_dialog=True) as browser:
page = browser.get_page()
page.goto("https://github.com/")
Browser and AsyncBrowser accept profile, service, task, verbose, and suppress_dialog.
Documentation
Practical setup, CLI, profile, API, architecture, and troubleshooting guides live in docs/.
Local docs preview:
cd docs
bundle install
bundle exec jekyll serve
Development
uv run ruff check --fix src tests
uv run ruff format src tests
uvx hatch test # runs offline in < 1 s, no Chrome needed
Run only the slow browser-integration tests (requires Chrome):
uv run pytest -m slow
Metadata
Release files for playwrightauthor 1.0.24
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| playwrightauthor-1.0.24.tar.gz | 1.3 MB | Without provenance | Details for playwrightauthor-1.0.24.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| playwrightauthor-1.0.24-py3-none-any.whl | Python 3 | none | any | Details for playwrightauthor-1.0.24-py3-none-any.whl |
Total release size: 1.4 MB
Security for playwrightauthor 1.0.24
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.