agent-browser

Automates browser interactions for web testing, form filling, and data extraction.

38|3|Updated Mar 22, 2024
One-click install
npx skills add https://github.com/anthonyshew/dotfiles --skill agent-browser-anthonyshew
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-browser
Source: https://github.com/anthonyshew/dotfiles/tree/main/opencode/.config/opencode/skill/agent-browser
Command: npx skills add https://github.com/anthonyshew/dotfiles --skill agent-browser-anthonyshew

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates browser interactions for web testing, form filling, and data extraction.

Core Features & Use Cases

  • Automated Navigation and Interaction: Open URLs, click elements, fill forms, and navigate back/forward.
  • Snapshot-based Automation: Generate element refs for robust automation and reuse them in subsequent actions.
  • Screenshots and Data Extraction: Capture screenshots and extract information from pages for verification or data collection.
  • Use Case: Example workflow to automate login, validate a dashboard, and export page data.

Quick Start

agent-browser open https://example.com agent-browser snapshot -i agent-browser click @e1 agent-browser fill @e2 "your text" agent-browser close

Frequently Asked Questions about agent-browser

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate web testing and browser interactions from the command line?

Automate web testing by using a Bash CLI to navigate URLs, click elements, fill forms, and capture screenshots. You run commands sequentially to open pages, take snapshots for element references, and execute interactions against a headless or headed browser environment.

How does snapshot-based browser automation work for reliable web testing?

Snapshot-based browser automation works by generating element references when you capture a page snapshot. You then reuse these stable references, such as @e1, in subsequent click and fill actions to interact with web elements reliably without relying on fragile selectors.

Can I use a Bash CLI to fill forms and extract data from web pages?

Yes, you can use a Bash CLI to fill forms and extract data from web pages. The CLI supports actions like fill to input text into form fields and snapshot to capture page content, enabling automated data extraction and form-filling workflows directly from the terminal.

What is the best way to capture screenshots during automated web testing?

The best way to capture screenshots during automated web testing is to use a CLI tool that supports screenshot actions within a scripted workflow. You navigate to the target URL, execute the screenshot command, and save the captured image for verification or data collection.

Does browser automation work in a headless environment for CLI web testing?

Browser automation works in both headless and headed browser environments for CLI web testing. This allows you to run automated navigation, form filling, and data extraction tasks silently in the background or with a visible browser window for debugging.

Why use element references instead of CSS selectors for browser automation?

Element references generated from snapshots provide a more robust target for browser automation than CSS selectors. By using refs like @e1 or @e2 for click and fill actions, you avoid selector breakage when page layouts change, ensuring reliable test execution.