Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

browser-use-e2e

verified

Generate and run E2E tests using browser-use AI automation. This skill should be used when creating automated browser tests, testing authenticated flows, generating test scripts from natural language, or validating user journeys with AI-powered browser control. Handles credentials securely via .env.test with domain-prefixed variables.

View on GitHub

Marketplace

scott-cc

citadelgrad/scott-cc

Plugin

browser-automation

Repository

citadelgrad/scott-cc
1stars

plugins/browser-automation/skills/browser-use-e2e/SKILL.md

Last Verified

February 5, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/citadelgrad/scott-cc/blob/main/plugins/browser-automation/skills/browser-use-e2e/SKILL.md -a claude-code --skill browser-use-e2e

Installation paths:

Claude
.claude/skills/browser-use-e2e/
Powered by add-skill CLI

Instructions

# browser-use E2E Testing

## Overview

Generate and execute end-to-end tests using browser-use, an AI-powered browser automation library. Tests are written in natural language and the AI agent figures out the specific interactions.

## Quick Start

### 1. Setup

```bash
# Install browser-use
uv add browser-use python-dotenv
uvx browser-use install
```

### 2. Configure Credentials

Create `.env.test` with domain-prefixed credentials:

```bash
# Format: SERVICENAME_USER, SERVICENAME_PASS, SERVICENAME_DOMAIN (optional)

GITHUB_USER=your-username
GITHUB_PASS=your-password

GMAIL_EMAIL=you@gmail.com
GMAIL_PASS=your-app-password

# Custom app
MYAPP_USER=admin
MYAPP_PASS=secret
MYAPP_DOMAIN=https://app.example.com
```

### 3. Credential Loader

```python
# tests/e2e/conftest.py
import os
from dotenv import load_dotenv

load_dotenv('.env.test')

DOMAIN_MAP = {
    'GITHUB': 'https://*.github.com',
    'GMAIL': 'https://*.google.com',
    'GOOGLE': 'https://*.google.com',
}

def build_sensitive_data() -> dict:
    """Build browser-use sensitive_data from .env.test vars."""
    credentials = {}

    for key in os.environ:
        if key.endswith('_USER') or key.endswith('_EMAIL'):
            prefix = key.rsplit('_', 1)[0]
            user_val = os.getenv(key)
            pass_key = f'{prefix}_PASS'
            pass_val = os.getenv(pass_key)

            if not pass_val:
                continue

            # Determine domain
            domain_key = f'{prefix}_DOMAIN'
            domain = os.getenv(domain_key) or DOMAIN_MAP.get(prefix)

            if not domain:
                continue

            # Build credential entry
            placeholder_user = f'{prefix.lower()}_user'
            placeholder_pass = f'{prefix.lower()}_pass'

            credentials[domain] = {
                placeholder_user: user_val,
                placeholder_pass: pass_val,
            }

    return credentials
```

## Test Patterns

### Simple Test

```python
from browser_use import Agen

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
5600 chars