REL × Playwright / Python
Keep the Playwright shape. Use your REL browser.
Port scraping scripts to the visible Chromium sessions already configured in REL. Keep browser, page, and locator workflows; change the import. REL's Direct Profile is the default, with saved Profiles available when a job needs one.
port.py1 change
- from playwright.sync_api import sync_playwright
+ from rel_playwright.sync_api import sync_playwright
with sync_playwright() as playwright:
browser = playwright.chromium.launch()
- 03
- official patterns ported
- RELDebug
- executed in visible Chromium
- Zero
- Playwright browser downloads
Same control flow. Different browser owner.
Playwright-shaped calls travel through REL's local versioned API to a real, isolated browser session. REL's built-in Direct Profile is used by default; a selected saved Profile supplies its browser identity, storage seed, proxy, AdBlock, and image-filter settings before the page loads.
REL does not start a second Chromium, expose CDP, inject arbitrary JavaScript, or copy proxy credentials into the Python process.
01Navigate and capture
Playwright’s library quickstart and screenshot recipes, using the visible Chromium session owned by REL.
Python● verified
from rel_playwright.sync_api import sync_playwright
with sync_playwright() as playwright:
browser = playwright.chromium.launch()
page = browser.new_page()
page.goto("https://playwright.dev")
print(page.title())
page.screenshot(
path="playwright-home.png",
full_page=True,
)
browser.close()
outputFast and reliable end-to-end testing for modern web apps | Playwright
02Extract a list
The documented all_inner_texts pattern, with a CSS locator over Playwright’s own homepage.
Python● verified
from rel_playwright.sync_api import sync_playwright
with sync_playwright() as playwright:
browser = playwright.chromium.launch()
page = browser.new_page()
page.goto("https://playwright.dev")
headings = page.locator("main h2").all_inner_texts()
for heading in headings:
print(heading)
browser.close()
outputBuilt for testing · Built for AI agents · Powerful tooling · Chosen by companies and open source projects
03Fill and submit
The Pages and Actions guides’ locator fill-and-press flow against REL’s stable, public browser-action fixture.
Python● verified
from rel_playwright.sync_api import sync_playwright
with sync_playwright() as playwright:
browser = playwright.chromium.launch()
page = browser.new_page()
page.goto("https://rel.me/browser-actions")
page.locator("#disco_search").fill("Magickraft")
page.locator("#disco_search").press("Enter")
print(
page.locator("#submission_status").inner_text()
)
browser.close()
outputsubmitted
Use it today
Install the adapter. Keep REL open.
The Python package lives in the public rel-toolsrepository. There is no playwright install step: REL is the Chromium runtime.
Installation and API coverage ↗TerminalPython 3.11+
git clone https://github.com/rel-me/rel-tools.git
cd rel-tools/playwright
python3 -m venv .venv
.venv/bin/python -m pip install -e .
Focused compatibility
Built for scraping, not protocol emulation.
Supported
Chromium launch, Profiles and Sessions, navigation, CSS locators, text and attribute extraction, native actions, waits, and bounded screenshots.
Explicitly outside the boundary
Caller-supplied JavaScript, CDP, route interception, frames, downloads, browser installation, Firefox, and WebKit fail clearly instead of switching browser backends.
See the complete supported surface ↗