From 0939226020442656394a5390d246c668606a0ae7 Mon Sep 17 00:00:00 2001 From: yuanmengqi Date: Wed, 16 Jul 2025 17:37:37 +0000 Subject: [PATCH] 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. --- .../bb5e4c0d-f964-439c-97b6-bdb9747de3f4.json | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/evaluation_examples/examples/chrome/bb5e4c0d-f964-439c-97b6-bdb9747de3f4.json b/evaluation_examples/examples/chrome/bb5e4c0d-f964-439c-97b6-bdb9747de3f4.json index e45a520..91e5304 100644 --- a/evaluation_examples/examples/chrome/bb5e4c0d-f964-439c-97b6-bdb9747de3f4.json +++ b/evaluation_examples/examples/chrome/bb5e4c0d-f964-439c-97b6-bdb9747de3f4.json @@ -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"