Playwright Browser

Automated headless web browser testing, page interactions, screenshot capture, and web scraping.

Lord1Egypt Updated 2 repo stars

File contents

Playwright Browser

Overview

Playwright is a modern framework for Web Testing and Automation, supporting Chromium, Firefox, and WebKit.

When to Use This Skill

Use to scrape dynamic single-page javascript apps, capture screenshots, or run automated integration tests.

Quick Start (with runnable code examples)

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(headless=True)
    page = browser.new_page()
    page.goto("https://github.com/Lord1Egypt")
    print("Page Title:", page.title())
    page.screenshot(path="github_profile.png")
    browser.close()

Advanced Usage

Intercept API network requests, mock geolocation, fill forms, and simulate drag-and-drop actions.

Key References

Dependencies

  • playwright>=1.40.0

Lord1Egypt/ai-skillforge/tree/main/js/skills/gemini/playwright-browser commit eeb8e953f3

Frequently asked questions

npx skillmds@latest add lord1egypt/playwright-browser-2