← 返回
未分类 中文

Selenium Automation Skill

Automate browser tasks using Selenium, including form filling, web scraping, UI testing, button clicks, alert handling, and capturing screenshots.
使用 Selenium 实现浏览器任务自动化,包括表单填写、网页爬取、UI 测试、按钮点击、弹窗处理和截图。
panchenbo panchenbo 来源
未分类 clawhub v1.0.0 1 版本 99877 Key: 无需
★ 0
Stars
📥 812
下载
💾 1
安装
1
版本
#latest

概述

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

  • Chrome: Full support with ChromeDriver
  • Firefox: Full support with GeckoDriver
  • Edge: Full support with EdgeDriver
  • Safari: Limited support (macOS only)

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:

  • Form filling with various input types
  • Web scraping with pagination
  • UI testing workflows
  • Error handling and retries
  • Browser configuration options

Browser Configuration

The scripts support various browser configurations:

  • Headless mode for background automation
  • Different viewport sizes
  • Custom user agents
  • Proxy support
  • Download directory configuration

Error Handling

Comprehensive error handling for:

  • Element not found
  • Page load timeouts
  • Network issues
  • Browser crashes
  • Form validation errors

Advanced Features

  • Wait strategies: Explicit waits, implicit waits, fluent waits
  • Element locators: ID, CSS selectors, XPath, name, class
  • JavaScript execution: Run custom JavaScript in browser
  • File uploads: Handle file input fields
  • Cookies management: Get, set, and manage cookies
  • Screenshots: Capture full page or element screenshots

Integration with Other Skills

This skill can be combined with:

  • browser-opener: Open browsers programmatically
  • data-processing: Process scraped data
  • file-operations: Save and manage output files

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-01 20:46 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Chart Data Viz

panchenbo
本地优先的图表生成引擎,支持趋势、比较、分布及快速可视化说明。适用于用户需要可视化数据的场景。
★ 0 📥 786
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 679 📥 327,928
dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 72 📥 182,002