← 返回
未分类 中文

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...
通用网页元素分析与 Selenium 自动化控制脚本生成。使用场景:①分析任意网页的 HTML 元素结构;②自动生成 Selenium 自动化控制脚本。
icestorms
未分类 clawhub v1.0.2 1 版本 100000 Key: 无需
★ 0
Stars
📥 413
下载
💾 23
安装
1
版本
#latest

概述

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

  1. Dependencies Required: Install selenium package and matching WebDriver before running

```bash

pip install selenium

```

WebDriver (Edge/Chrome/Firefox) must match your browser version

  1. 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
  1. 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 <URL> -o <output_file> -w <wait_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自动化控制代码。

⚠️ 安全警告

  1. 依赖要求:运行前需安装 selenium 包和对应浏览器的 WebDriver

```bash

pip install selenium

```

WebDriver(Edge/Chrome/Firefox)需与浏览器版本匹配

  1. 敏感数据风险
    • 不要访问包含敏感信息的内部网络页面
    • 页面HTML可能包含token、CSRF凭证等敏感数据
    • 分析完成后建议删除临时文件
  1. 仅用于授权页面
    • 仅分析你有权限访问的页面
    • 不要自动化控制你不拥有的设备

工作流程

步骤1: 下载网页源码

python scripts/fetch_page.py <URL> -o <输出文件> -w <等待秒数>

步骤2: 大模型分析

将下载的HTML源码发送给大模型进行元素识别和分析。

步骤3: 生成控制脚本

根据分析结果编写Selenium自动化脚本。

输出格式要求

大模型分析后应输出:

  • 页面概述(标题、框架)
  • 元素清单表格(推荐定位方式)
  • 完整Python代码
  • 注意事项

版本历史

共 1 个版本

  • v1.0.2 当前
    2026-03-31 10:55 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 669 📥 324,253
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 712 📥 243,922
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,359 📥 318,562