HTML-to-Selenium
/install html-to-selenium
General Webpage Element Analysis & Selenium Control
Overview
This skill analyzes HTML structure of any webpage, identifies interactive elements, and generates Selenium automation control code.
⚠️ Security Warnings
-
Dependencies Required: Install
seleniumpackage and matching WebDriver before runningpip install seleniumWebDriver (Edge/Chrome/Firefox) must match your browser version
-
Sensitive Data Risk:
- Do not access internal network pages with sensitive information
- Page HTML may contain tokens, CSRF credentials, etc.
- Delete temporary files after analysis
-
Authorized Pages Only:
- Only analyze pages you have permission to access
- Do not automate control of devices you don't own
Workflow
Step 1: Download Page Source
python scripts/fetch_page.py \x3CURL> -o \x3Coutput_file> -w \x3Cwait_seconds>
Step 2: LLM Analysis
Send the downloaded HTML to LLM for element identification and analysis.
Step 3: Generate Control Script
Write Selenium automation script based on analysis results.
Output Format
LLM analysis should include:
- Page overview (title, framework)
- Element inventory table (recommended locating method)
- Complete Python code
- Notes & considerations
通用网页元素分析与Selenium控制
概述
这个Skill用于分析任意网页的HTML结构,识别可交互元素,并生成Selenium自动化控制代码。
⚠️ 安全警告
-
依赖要求:运行前需安装
selenium包和对应浏览器的 WebDriverpip install seleniumWebDriver(Edge/Chrome/Firefox)需与浏览器版本匹配
-
敏感数据风险:
- 不要访问包含敏感信息的内部网络页面
- 页面HTML可能包含token、CSRF凭证等敏感数据
- 分析完成后建议删除临时文件
-
仅用于授权页面:
- 仅分析你有权限访问的页面
- 不要自动化控制你不拥有的设备
工作流程
步骤1: 下载网页源码
python scripts/fetch_page.py \x3CURL> -o \x3C输出文件> -w \x3C等待秒数>
步骤2: 大模型分析
将下载的HTML源码发送给大模型进行元素识别和分析。
步骤3: 生成控制脚本
根据分析结果编写Selenium自动化脚本。
输出格式要求
大模型分析后应输出:
- 页面概述(标题、框架)
- 元素清单表格(推荐定位方式)
- 完整Python代码
- 注意事项
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install html-to-selenium - 安装完成后,直接呼叫该 Skill 的名称或使用
/html-to-selenium触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
HTML-to-Selenium 是什么?
General webpage element analysis and Selenium automation control script generation. Use cases: (1) Analyze HTML element structure of any webpage (2) Automati... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 143 次。
如何安装 HTML-to-Selenium?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install html-to-selenium」即可一键安装,无需额外配置。
HTML-to-Selenium 是免费的吗?
是的,HTML-to-Selenium 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
HTML-to-Selenium 支持哪些平台?
HTML-to-Selenium 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 HTML-to-Selenium?
由 张 庆 ( Zhang Qing )(@icestorms)开发并维护,当前版本 v1.0.2。