Overview
- Skill Key
- gg-erick/selenium-browser-skill
- Author
- gg-erick
- Source Repo
- openclaw/skills
- Version
- -
- Source Path
- skills/gg-erick/selenium-browser-skill
- Latest Commit SHA
- 5bc0bd16084d50011ed29cc872751279f9ca8a57
Teaches the agent how to perform advanced web automation using Python, Selenium WebDriver, and ChromeDriver.
Stars
0
Installs
0
Status
ACTIVE
Visibility
PUBLIC
直接复制以下提示词,发送给你的 AI 助手即可完成安装。
请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 selenium-automation 技能。 若已安装,则直接安装 selenium-automation 技能。
# Selenium Automation Skill
You are an expert at web automation using Python and Selenium WebDriver. When the user asks you to automate a browser task, scrape a website, or take screenshots, write the Python code using the snippets below.
## 0. Security and Execution Rules
* **Never run the script automatically.**
* After you write the Python script (for example `automation.py`), you must stop and ask the user for explicit permission to run it.
* Only use the `exec` tool after the user says "yes" or "approved".
## 1. Setup and ChromeDriver
Always configure Chrome to run in headless mode unless the user requests a visible browser.
```python
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--disable-dev-shm-usage")
# Initialize the WebDriver
service = Service()
driver = webdriver.Chrome(service=service, options=chrome_options)
```
## 2. Navigation Commands
Use these commands to open web pages and navigate.
```python
driver.get("[https://example.com](https://example.com)")
driver.refresh()
driver.back()
driver.forward()
current_url = driver.current_url
page_title = driver.title
```
## 3. Taking Screenshots
You can take a screenshot of the entire visible window or a specific HTML element.
```python
driver.save_screenshot("full_page.png")
from selenium.webdriver.common.by import By
element = driver.find_element(By.ID, "main-content")
element.screenshot("element.png")
```
## 4. JavaScript Injections
Use `execute_script` to run custom JavaScript directly inside the browser.
```python
driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
page_height = driver.execute_script("return document.body.scrollHeight;")
element = driver.find_element(By.ID, "hidden-button")
driver.execute_script("arguments[0].click();", ele...
capt-marbles
Task Router
capncoconut
Register, communicate, and earn on the x402hub AI agent marketplace. Use when an agent needs to register on x402hub, browse or claim bounties, submit deliverables, send messages to other agents via x402 Relay, check marketplace stats, or manage agent credentials. Triggers on x402hub, agent marketplace, bounty, relay messaging, agent-to-agent communication, or USDC earning.
capevace
Real-time event bus for AI agents. Publish, subscribe, and share live signals across a network of agents with Unix-style simplicity.
captchasco
OpenClaw integration guidance for CAPTCHAS Agent API, including OpenResponses tool schemas and plugin tool registration.
carol-gutianle
name: modelready description: Start using a local or Hugging Face model instantly, directly from chat. metadata: {"openclaw":{"requires":{"bins": "bash", "curl" }, "env": "URL" }}
canbirlik
Controls Wiz smart bulbs (turn on/off, RGB colors, disco mode) via local WiFi.