mirror of
https://github.com/hanzoai/pack.git
synced 2026-09-30 23:43:13 +00:00
* feat: automatically install packages required for playwright, and playwright browser This reverts commit 2a5567ff09fa044cf391b1d79ecf1fe7846e8828. * docs: update environment variable test configuration property name Generated-by: aiautocommit * docs(node): add production deployment guide link to start command help Generated-by: aiautocommit * feat(python-playwright): install playwright only when requested via env - Enable Playwright browser installation conditionally using `RAILPACK_PYTHON_PLAYWRIGHT_INSTALL`. - Update python-playwright example to test against example.com. Generated-by: aiautocommit * feat(python): make Playwright browser installation opt-in - Require `RAILPACK_PYTHON_PLAYWRIGHT_INSTALL=1` to install Playwright browsers and their runtime dependencies automatically. - Prevent unintended deployment size increases and breaking changes for existing users since automatic installation can cause issues. - Add test coverage verifying opt-in behavior and production dependency resolution. Generated-by: aiautocommit * docs(python): document playwright install configuration variable Generated-by: aiautocommit * feat(node): add support for checking production-only dependencies Generated-by: aiautocommit * feat(node): make Playwright browser installation opt-in - Restrict automatic Playwright detection to production dependencies and require an explicit environment variable to install browsers, preventing unexpected side effects for existing users. - Add tests to verify Playwright installation behavior based on environment configuration. Generated-by: aiautocommit * docs: add unit testing guideline against testing log output Generated-by: aiautocommit * chore(deps): update playwright dependency to v1.60 in node-playwright example Generated-by: aiautocommit * feat(node,python): update Playwright runtime dependencies for Debian 12 - Align Playwright runtime dependencies with the official nativeDeps.ts list for Debian 12 Chromium. - Ensure production runtime images include all required system libraries for Playwright without relying on builder-only installation flags. Generated-by: aiautocommit * feat(examples): navigate to example.com in playwright node example Generated-by: aiautocommit * docs(node): document opt-in Playwright browser installation Generated-by: aiautocommit * test(core): update test snapshots for playwright production-only dependencies Generated-by: aiautocommit * docs: add instruction regarding snapshot updates to PR template Generated-by: aiautocommit * feat(node): remove libatomic1 requirement for Node.js 25+ Generated-by: aiautocommit * test(core): update playwright snapshots for mise version and apt caches Generated-by: aiautocommit
16 lines
504 B
Python
16 lines
504 B
Python
from playwright.sync_api import sync_playwright
|
|
|
|
print("Starting Playwright")
|
|
with sync_playwright() as p:
|
|
browser = p.chromium.launch(headless=True, args=["--no-sandbox"])
|
|
version = browser.version
|
|
print(f"Chromium version: {version}")
|
|
print("Creating Page")
|
|
page = browser.new_page()
|
|
print("Navigating to example.com")
|
|
page.goto("https://example.com", wait_until="networkidle")
|
|
assert page.title() == "Example Domain"
|
|
browser.close()
|
|
|
|
print("Hello from playwright")
|