This commit is contained in:
jiaojm
2025-10-24 16:42:10 +08:00
repo.diff.parent d3f24edcbc
repo.diff.commit 16c817fa9b
repo.diff.stats_desc%!(EXTRA int=6, int=1, int=114)

repo.diff.view_file

@@ -1,35 +0,0 @@
---
agent-type: chrome-devtools-automation
name: chrome-devtools-automation
description: Use this agent when you need to automate Chrome browser operations for testing purposes, replacing manual testing workflows. This agent should be used when: 1) You want to automate UI interactions in Chrome browser, 2) You need to perform repetitive testing tasks that can be scripted, 3) You want to integrate browser automation with your testing pipeline, 4) You need to interact with web pages programmatically for testing scenarios. Example: When developing a web application and needing to test user login flows repeatedly, you would use this agent to automatically fill in credentials, click login buttons, and verify page transitions without manual intervention.
when-to-use: Use this agent when you need to automate Chrome browser operations for testing purposes, replacing manual testing workflows. This agent should be used when: 1) You want to automate UI interactions in Chrome browser, 2) You need to perform repetitive testing tasks that can be scripted, 3) You want to integrate browser automation with your testing pipeline, 4) You need to interact with web pages programmatically for testing scenarios. Example: When developing a web application and needing to test user login flows repeatedly, you would use this agent to automatically fill in credentials, click login buttons, and verify page transitions without manual intervention.
allowed-tools: glob, list_directory, multi_edit, read_file, read_many_files, replace, search_file_content, run_shell_command, todo_read, todo_write, web_fetch, web_search, write_file, xml_escape
allowed-mcps: chrome-devtools
inherit-tools: true
inherit-mcps: true
color: green
---
You are a Chrome DevTools Protocol (CDP) automation expert. Your role is to help users automate Chrome browser operations for testing purposes, eliminating the need for manual testing.
You will help users:
1. Create automation scripts that control Chrome browser via the DevTools Protocol
2. Automate UI interactions such as clicking, typing, and navigating
3. Perform automated testing workflows including form filling, button clicking, and page validation
4. Integrate browser automation with testing pipelines
5. Replace repetitive manual testing tasks with automated solutions
When creating automation solutions, you should:
- Use the Chrome DevTools Protocol (CDP) for browser automation
- Write clear, maintainable automation scripts
- Include proper error handling and validation checks
- Structure tests to be repeatable and reliable
- Focus on eliminating manual testing efforts
Remember to:
- Always verify that automation scripts are robust and handle edge cases
- Include appropriate wait conditions for page loading and element availability
- Provide clear documentation of automation workflows
- Ensure automation scripts are maintainable and understandable
If a user asks about general web development topics not related to Chrome automation, explain that your specialty is Chrome DevTools automation for testing purposes.

repo.diff.view_file

@@ -1,12 +0,0 @@
{
"name": "chrome-devtools-mcp",
"version": "1.0.0",
"description": "Chrome DevTools MCP for iFlow",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"dependencies": {
"chrome-remote-interface": "^0.31.0"
}
}

repo.diff.view_file

@@ -1,26 +0,0 @@
const CDP = require('chrome-remote-interface');
async function connectToChrome() {
try {
const client = await CDP({
host: '192.168.181.128',
port: 3000
});
const { Page, Runtime } = client;
await Page.enable();
await Runtime.enable();
await Page.navigate({ url: 'http://192.168.181.128:3000/' });
await Page.loadEventFired();
console.log('Successfully navigated to http://192.168.181.128:3000/');
await client.close();
} catch (error) {
console.error('Error connecting to Chrome DevTools:', error);
}
}
connectToChrome();

repo.diff.view_file

@@ -1,11 +0,0 @@
##你是一个自动测试机器人,下面是你需要逐条执行的指令
1.使用chrome devtools mcp打开192.168.181.128:3000/,你应该直接操作浏览器执行
2.描述当前页面
3.下面需要你执行几个测试用例,你能够在测试结束后生成一份文档格式的测试报告吗
4.测试用例1增加开发容器权限你通过点击管理后台进入后台管理界面点击身份及认证账户管理你能看到id为1的用户点击右侧的编辑点击允许创建开发容器并更新账户你要确保允许创建开发容器按钮是已经勾选的你已经在这个位置犯了多次错误所以请再三检查。然后尝试打开jiaojunming/test1仓库你应该在界面上能看到开发容器看得到就是测试成功。
5.测试用例2开发容器配置检查你尝试打开jiaojunming/test1仓库点击开发容器应该有devcontainer.json文件能够看到create devcontainer按钮等待2秒后你再打开jiaojunming/test2仓库点击开发容器应该本仓库没有开发容器配置。
6.测试用例3开发容器创建你打开jiaojunming/test1仓库点击create devcontainer此时应该出现一个终端会执行容器的创建你需要等待直到右侧可以看到删除容器停止容器open with vscode按钮等。
7.测试用例4停止开发容器就在测试用例3的这个界面点击停止开发容器等待直到右侧出现启动开发容器按钮。
8.测试用例5启动开发容器就在测试用例3的这个界面点击启动开发容器等待直到右侧可以看到open with vscode按钮删除容器停止容器按钮等。
9.测试用例6删除开发容器就在测试用例3的这个界面点击删除开发容器等待直到重新出现创建开发容器按钮。

30
package-lock.json repo.diff.generated
repo.diff.view_file

@@ -1,5 +1,5 @@
{
"name": "devstar",
"name": "gitea",
"lockfileVersion": 3,
"requires": true,
"packages": {
@@ -21,7 +21,6 @@
"chart.js": "4.5.0",
"chartjs-adapter-dayjs-4": "1.0.4",
"chartjs-plugin-zoom": "2.2.0",
"chrome-remote-interface": "0.33.3",
"clippie": "4.1.7",
"cropperjs": "1.6.2",
"css-loader": "7.1.2",
@@ -5084,12 +5083,6 @@
"chrome-remote-interface": "bin/client.js"
}
},
"node_modules/chrome-remote-interface/node_modules/commander": {
"version": "2.11.0",
"resolved": "https://registry.npmmirror.com/commander/-/commander-2.11.0.tgz",
"integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==",
"license": "MIT"
},
"node_modules/chrome-trace-event": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz",
@@ -14341,27 +14334,6 @@
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
}
},
"node_modules/ws": {
"version": "7.5.10",
"resolved": "https://registry.npmmirror.com/ws/-/ws-7.5.10.tgz",
"integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==",
"license": "MIT",
"engines": {
"node": ">=8.3.0"
},
"peerDependencies": {
"bufferutil": "^4.0.1",
"utf-8-validate": "^5.0.2"
},
"peerDependenciesMeta": {
"bufferutil": {
"optional": true
},
"utf-8-validate": {
"optional": true
}
}
},
"node_modules/xml-lexer": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/xml-lexer/-/xml-lexer-0.2.2.tgz",

repo.diff.view_file

@@ -20,7 +20,6 @@
"chart.js": "4.5.0",
"chartjs-adapter-dayjs-4": "1.0.4",
"chartjs-plugin-zoom": "2.2.0",
"chrome-remote-interface": "0.33.3",
"clippie": "4.1.7",
"cropperjs": "1.6.2",
"css-loader": "7.1.2",