# Automate Browser Flows with Playwright CLI

Manual browser inspection makes reliable automation scripts difficult to author. This skill uses Playwright CLI to navigate pages, capture snapshots, and verify selectors.

## Install

```bash
npx skillstore add screenci/playwright-cli
```

## Metadata

- Status: approved
- Slug: screenci-playwright-cli
- Skillstore revision: r2
- Version status: missing
- Tree hash: 2a6b571d31654d0424bdc024ab547d8e3bed1d135b0139a6f8a638b90b2a1149
- Author: screenci
- GitHub username: screenci
- License: MIT
- Repository: https://github.com/screenci/screenci/tree/main/skills/playwright-cli/
- Ref: ebdfe608f5de2b66ff37ab4af12af8ac4f5e8006
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network
- Quality score: 69
- Public page: https://skillstore.pages.dev/skills/screenci-playwright-cli
- Manifest: https://skillstore.pages.dev/api/skills/screenci-playwright-cli/manifest

## Capabilities

- Opens browser sessions and navigates to specified web pages.
- Captures page snapshots with element references for later interactions.
- Clicks, types, fills, selects, checks, and hovers over page elements.
- Evaluates page expressions to inspect titles, text, and element attributes.
- Identifies stable selectors and cookie consent actions for ScreenCI scripts.
- Compares before and after snapshots to reveal page state changes.

## Use Cases

- Verify a User Journey: Navigate a live flow, interact with controls, and capture page states before adding an automated test.
- Discover Stable Selectors: Inspect roles, test identifiers, and attributes to select reliable targets for browser automation.
- Prepare a ScreenCI Recording: Find consent actions and hidden setup steps before creating a repeatable ScreenCI visual script.

## Prompt Templates

### Open and Inspect a Page

```
Open [URL], capture a snapshot, and summarize the page title, main controls, and visible consent banners. Do not submit forms.
```

### Test a Simple Interaction

```
Open [URL], find [control], activate it, and compare snapshots before and after. Report the resulting page change.
```

### Map a Complete Flow

```
Inspect the flow from [start URL] to [goal]. Record each action, stable locator, page state, and required consent step.
```

### Prepare ScreenCI Automation

```
Analyze [URL] for a ScreenCI script. Identify hidden setup actions, resilient selectors, dynamic content risks, and checkpoints for each visible step.
```

## Limitations

- Requires Playwright CLI to be installed globally or available in the current project.
- Element references can change after navigation or page updates.
- The skill inspects live pages but does not author complete ScreenCI scripts by itself.
- Authentication, captchas, and protected environments may require manual access or additional setup.

## Best Practices

- Capture a new snapshot after navigation or any action that changes the page.
- Prefer roles, accessible names, and test identifiers over fragile CSS paths.
- Confirm the target domain and expected side effects before submitting forms.

## Anti Patterns

- Do not reuse stale element references after the page changes.
- Do not enter real credentials or sensitive data into demonstration flows.
- Do not install mutable global packages without explicit user approval.

## Security Audit

- Audited at: 2026-07-23T19:37:22.606\+00:00
- Summary: All 37 static findings are false positives caused by Markdown code formatting, expected browser commands, benign example URLs, and a comment. One medium semantic risk remains: the fallback installation uses a mutable package version globally, increasing supply-chain and host impact.

## Stats

- Views: 0
- Downloads: 3
- Favorites: 0
- Popularity score: 0
