Locator DoctorYour Playwright locator failed. Here's why. Locator Doctor automatically turns a Playwright failure in VS Code's integrated terminal into a concise, evidence-based debugging diagnosis. ProblemPlaywright errors contain useful details, but locator and timing failures are often difficult to interpret while debugging a test. Locator Doctor identifies the failure type, extracts its locator and source location when available, and separates what the error proves from plausible next things to check. Features
ExampleGiven:
Locator Doctor reports that Playwright waited five seconds for that button and presents likely (not asserted) causes, such as an accessible-name change or an application state that has not rendered the button. InstallationInstall Locator Doctor from the VS Code Extensions view, then reload VS Code if prompted. No setup, API key, terminal command, or configuration is required. Usage
Automatic terminal analysis requires VS Code terminal shell integration, which is enabled by default in supported shells such as zsh, bash, and PowerShell. If needed, the Command Palette also includes Locator Doctor: Analyze Last Test Failure for a saved Playwright report or log. AI and privacyV0.1 runs its included local provider offline. No API key is included and no repository content is sent anywhere. The future AI-provider interface accepts only structured failure data, a small source window near the failure, detected prior actions, and lightweight project metadata. It is designed so an added provider can use this minimum context rather than the whole repository. Architecture
The parser, source-context reader, locator analyzer, diagnosis validation, and provider are independent TypeScript modules so automatic failure detection, trace analysis, and remote providers can be added without changing the UI workflow. Roadmap
|