π¦ ClawHub
Selenium Automation Skill
by @panchenbo
Automate browser tasks using Selenium, including form filling, web scraping, UI testing, button clicks, alert handling, and capturing screenshots.
TERMINAL
clawhub install selenium-automation-skillπ About This Skill
name: selenium-automation description: Browser automation skill using Selenium for web scraping, form filling, and UI testing. Use when Codex needs to automate browser interactions including: (1) Filling forms and submitting data, (2) Web scraping and data extraction, (3) UI testing and validation, (4) Clicking buttons and navigating pages, (5) Handling alerts and popups, (6) Taking screenshots of web pages
Selenium Browser Automation Skill
This skill provides comprehensive browser automation capabilities using Selenium WebDriver.
Quick Start
Basic form filling example:
# Fill and submit a form
python scripts/form_filler.py --url https://example.com/login --username testuser --password testpass
Web scraping example:
# Extract data from a webpage
python scripts/web_scraper.py --url https://example.com/data --output results.csv
Installation Requirements
Before using this skill, install the required dependencies:
pip install selenium webdriver-manager beautifulsoup4 pandas
Supported Browsers
Core Scripts
Form Filling (scripts/form_filler.py)
Automatically fill forms and submit data:
python scripts/form_filler.py --url https://example.com/login --username testuser --password testpass
python scripts/form_filler.py --url https://example.com/contact --name "John Doe" --email "john@example.com" --message "Hello"
Web Scraper (scripts/web_scraper.py)
Extract data from web pages:
python scripts/web_scraper.py --url https://example.com/products --output products.csv
python scripts/web_scraper.py --url https://example.com/news --output news.json --format json
UI Tester (scripts/ui_tester.py)
Perform UI testing and validation:
python scripts/ui_tester.py --url https://example.com --element "login-button" --action click
python scripts/ui_tester.py --url https://example.com --element "username" --action type --text "testuser"
Usage Examples
See examples/ for comprehensive examples including:
Browser Configuration
The scripts support various browser configurations:
Error Handling
Comprehensive error handling for:
Advanced Features
Integration with Other Skills
This skill can be combined with:
π‘ Examples
Basic form filling example:
# Fill and submit a form
python scripts/form_filler.py --url https://example.com/login --username testuser --password testpass
Web scraping example:
# Extract data from a webpage
python scripts/web_scraper.py --url https://example.com/data --output results.csv