feat: enhance evaluator configuration with post-execution commands for Chrome

- Added a series of postconfig commands to the evaluator section in the JSON file.
- Commands include executing a refresh in Chrome, managing Chrome processes, launching Chrome with remote debugging, and opening specific settings tabs.
- Introduced sleep intervals to ensure proper execution timing between commands.

This update improves the automation capabilities of the evaluation examples while maintaining existing logic.
This commit is contained in:
yuanmengqi
2025-07-16 17:37:37 +00:00
parent e433f35c1f
commit 0939226020

View File

@@ -29,6 +29,80 @@
"chrome"
],
"evaluator": {
"postconfig": [
{
"type": "execute",
"parameters": {
"command": [
"python3",
"-c",
"import pyautogui; pyautogui.press('f5')"
]
}
},
{
"type": "sleep",
"parameters": {
"seconds": 3
}
},
{
"type": "execute",
"parameters": {
"command": [
"pkill",
"-f",
"google-chrome"
]
}
},
{
"type": "launch",
"parameters": {
"command": [
"google-chrome",
"--remote-debugging-port=1337"
]
}
},
{
"type": "launch",
"parameters": {
"command": [
"socat",
"tcp-listen:9222,fork",
"tcp:localhost:1337"
]
}
},
{
"type": "chrome_open_tabs",
"parameters": {
"urls_to_open": [
"chrome://settings/search",
"chrome://settings"
]
}
},
{
"type": "sleep",
"parameters": {
"seconds": 3
}
},
{
"type": "execute",
"parameters": {
"command": ["pkill", "-SIGHUP", "-f", "google-chrome"]
}
},
{
"type": "sleep",
"parameters": {
"seconds": 3
}
}
],
"func": "match_in_list",
"result": {
"type": "default_search_engine"