Teaches the agent how to perform advanced web automation using Python, Selenium WebDriver, and ChromeDriver.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install selenium-browser-skill或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install selenium-browser-skill⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/selenium-browser-skill/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: selenium-automation description: "Teaches the agent how to perform advanced web automation using Python, Selenium WebDriver, and ChromeDriver." metadata: openclaw: emoji: "🌐" requires: - exec - write dependencies: system: - python3 - chromedriver - google-chrome python: - selenium install: | pip install selenium ---
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.
automation.py), you must stop and ask the user for explicit permission to run it.exec tool after the user says "yes" or "approved".Always configure Chrome to run in headless mode unless the user requests a visible browser.
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)
Use these commands to open web pages and navigate.
driver.get("[https://example.com](https://example.com)")
driver.refresh()
driver.back()
driver.forward()
current_url = driver.current_url
page_title = driver.title
You can take a screenshot of the entire visible window or a specific HTML element.
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")
Use execute_script to run custom JavaScript directly inside the browser.
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();", element)
driver.execute_script("document.getElementById('cookie-banner').remove();")
Use these standard commands to find elements, click buttons, and type text.
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
wait = WebDriverWait(driver, 10)
button = wait.until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".submit-btn")))
button.click()
search_box = driver.find_element(By.NAME, "q")
search_box.send_keys("OpenClaw documentation")
search_box.send_keys(Keys.RETURN)
header = driver.find_element(By.TAG_NAME, "h1")
print("Text:", header.text)
print("Class attribute:", header.get_attribute("class"))
Always close the browser at the end of the script to free up system memory.
driver.quit()安装 Selenium Automation 后,可以对 AI 说这些话来触发它
Help me get started with Selenium Automation
Explains what Selenium Automation does, walks through the setup, and runs a quick demo based on your current project
Use Selenium Automation to teaches the agent how to perform advanced web automation using Pyth...
Invokes Selenium Automation with the right parameters and returns the result directly in the conversation
What can I do with Selenium Automation in my developer & devops workflow?
Lists the top use cases for Selenium Automation, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/selenium-browser-skill/ 目录(个人级,所有项目可用),或 .claude/skills/selenium-browser-skill/(项目级)。重启 AI 客户端后,用 /selenium-browser-skill 主动调用,或让 AI 根据上下文自动发现并使用。
Selenium Automation 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Selenium Automation 可免费安装使用。请查阅仓库了解许可证信息。
Teaches the agent how to perform advanced web automation using Python, Selenium WebDriver, and ChromeDriver.
Selenium Automation 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using Selenium Automation
Identifies repetitive steps in your workflow and sets up Selenium Automation to handle them automatically