microsoft / microsoft/Webwright

enhancement : Add onboarding validation command (webwright doctor)

Open
#21 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
6k
Forks
384
PR merge metrics
No merged PRs in 30d

Description

Add webwright doctor onboarding validation command

Summary

Add a webwright doctor CLI command that validates local environment setup and provides actionable fixes for common onboarding/runtime issues.


Current State

Webwright setup currently requires multiple manual steps:

  • Python environment setup
  • Playwright installation
  • Chromium browser installation
  • Claude/Codex plugin setup
  • API key configuration
  • Browser runtime validation

When something is misconfigured, failures often happen later during runtime with limited debugging guidance.

Examples:

  • Missing Chromium binaries
  • Playwright not installed
  • Missing API keys
  • Plugin manifest/configuration issues
  • Screenshot permission failures

This creates onboarding friction for new contributors and users.


Desired State

Provide a command:

webwright doctor

that validates the local environment before runtime.

Example output:

Webwright Doctor

[PASS] Python 3.11 detected
[PASS] playwright installed
[FAIL] Chromium missing
       Fix: playwright install chromium

[PASS] OPENAI_API_KEY detected
[FAIL] Claude plugin manifest missing

4/6 checks passed

Proposed Checks

Environment
  • Python version compatibility
  • Required package availability
  • Writable directories
Playwright
  • Playwright installation
  • Chromium/browser availability
  • Headless launch validation
Configuration
  • API key detection
  • Plugin manifest detection
  • Environment variable validation
Runtime Validation
  • Launch browser
  • Open simple webpage
  • Capture screenshot successfully

Proposed Implementation

New Module
webwright/run/doctor.py
CLI Integration
@app.command()
def doctor():
    run_doctor()
Suggested Structure
CHECKS = [
    check_python,
    check_playwright,
    check_chromium,
    check_api_keys,
    check_plugins,
    check_screenshot,
]
Optional Enhancements
  • --verbose
  • --fix
  • JSON output mode
  • CI compatibility

Benefits

  • Easier onboarding
  • Better contributor experience
  • Faster debugging
  • Fewer duplicate setup issues
  • Reduced maintainer support burden

Scope

This should be relatively self-contained and beginner/intermediate contributor friendly.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the CLI integration point shown with @app.command() and review the proposed webwright/run/doctor.py module and CHECKS structure. Implement the named environment, Playwright, configuration, and runtime checks so webwright doctor reports pass/fail results with actionable fixes for setup problems.

Written by the indexing model from the issue text.

Assessment

Tech stack
playwright, python
Domain
cli, developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.