cdp-page-control/skills/cdp-page-control/interface.json
2026-10-02 09:26:18 +08:00

147 lines
3.3 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"summary": "驱动受控浏览器操作任意网站页面(导航、填表、点击、读文本、截图、抓网络)",
"useWhen": "要在某个网站的页面上点击/填表/翻页/取文本/截图/抓接口,或用已登录的浏览器会话做页面自动化时",
"tier": 1,
"entry": {
"path": "scripts/cdpctl.mjs"
},
"aliases": [
"cdpctl"
],
"commands": [
{
"name": "launch",
"summary": "启动/复用受控浏览器"
},
{
"name": "nav",
"summary": "打开 URL / 前进 / 后退 / 刷新"
},
{
"name": "snapshot",
"summary": "页面结构快照:可见交互元素 + @N 引用"
},
{
"name": "wait",
"summary": "等元素/条件出现"
},
{
"name": "find",
"summary": "找元素,返回定位器"
},
{
"name": "click",
"summary": "点击元素"
},
{
"name": "type",
"summary": "输入文本"
},
{
"name": "fill",
"summary": "按 JSON 批量填表(输入/下拉/勾选)"
},
{
"name": "press",
"summary": "按键/组合键"
},
{
"name": "drag",
"summary": "真实鼠标拖拽(含原生 HTML5 拖放)"
},
{
"name": "select",
"summary": "下拉选择"
},
{
"name": "hover",
"summary": "悬停元素"
},
{
"name": "upload",
"summary": "上传文件"
},
{
"name": "insert-text",
"summary": "向焦点元素插入文本(自绘编辑器)"
},
{
"name": "text",
"summary": "读元素文本"
},
{
"name": "html",
"summary": "读元素 HTML"
},
{
"name": "eval",
"summary": "在页面里执行 JS"
},
{
"name": "net",
"summary": "抓网络请求"
},
{
"name": "console",
"summary": "读控制台消息(含历史回放与异常)"
},
{
"name": "shot",
"summary": "截图(整页或单个元素)"
},
{
"name": "pdf",
"summary": "整页导出 PDF(打印管线,一次调用拿到全部内容,不受视口限制):pdf <out.pdf> --size WxH [--media screen|print];要 PNG 再用 qlmanage -t -s <2*max(W,H)> 矢量重栅格"
},
{
"name": "cookies",
"summary": "读写 cookie"
},
{
"name": "import-cookies",
"summary": "把日常 Chrome 的登录态复制进受控浏览器(默认预览,--yes 执行)"
},
{
"name": "persist-cookies",
"summary": "把会话 cookie 改成持久 cookie(跨重启保登录)"
},
{
"name": "targets",
"summary": "列出标签页"
},
{
"name": "open",
"summary": "新开标签页"
},
{
"name": "close",
"summary": "关闭标签页"
},
{
"name": "status",
"summary": "浏览器状态"
},
{
"name": "stop",
"summary": "关闭受控浏览器"
}
],
"errors": [
"usage",
"auth",
"notfound",
"blocked",
"timeout",
"external",
"internal"
],
"helpListsCommands": true,
"publish": {
"package_repo": "https://gitea.vhkd.top/geekinney/cdp-page-control.git"
},
"catalog": {
"layer": "core",
"why": "别的技能建在它上面"
}
}