diff --git a/desktop_env/evaluators/getters/__init__.py b/desktop_env/evaluators/getters/__init__.py index d3a349d..43f4c1b 100644 --- a/desktop_env/evaluators/getters/__init__.py +++ b/desktop_env/evaluators/getters/__init__.py @@ -20,7 +20,6 @@ from .chrome import ( get_find_unpacked_extension_path, get_data_delete_automacally, get_active_tab_html_parse, - get_active_tab_html_parse_accTree, get_active_tab_url_parse, get_gotoRecreationPage_and_get_html_content, get_url_dashPart, diff --git a/evaluation_examples/examples/chrome/9f935cce-0a9f-435f-8007-817732bfc0a5.json b/evaluation_examples/examples/chrome/9f935cce-0a9f-435f-8007-817732bfc0a5.json index c465279..a868b34 100644 --- a/evaluation_examples/examples/chrome/9f935cce-0a9f-435f-8007-817732bfc0a5.json +++ b/evaluation_examples/examples/chrome/9f935cce-0a9f-435f-8007-817732bfc0a5.json @@ -1,62 +1,63 @@ { - "id": "9f935cce-0a9f-435f-8007-817732bfc0a5", - "snapshot": "chrome", - "instruction": "Browse list of Civil Division forms.", - "source": "online_tasks", - "config": [ - { - "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": [ - "https://www.justice.gov/" - ] - } - }, - { - "type": "activate_window", - "parameters": { - "window_name": "Google Chrome" - } + "id": "9f935cce-0a9f-435f-8007-817732bfc0a5", + "snapshot": "chrome", + "instruction": "Browse list of Civil Division forms.", + "source": "online_tasks", + "config": [ + { + "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": [ + "https://www.justice.gov/" + ] + } + }, + { + "type": "activate_window", + "parameters": { + "window_name": "Google Chrome" + } + } + ], + "trajectory": "trajectories/", + "related_apps": [ + "chrome" + ], + "evaluator": { + "func": "is_expected_url_pattern_match", + "result": { + "type": "active_tab_info", + "selectors": [ + "application[name=Chromium] entry[name=Address\\ and\\ search\\ bar]" + ], + "goto_prefix": "https://www." + }, + "expected": { + "type": "rule", + "rules": { + "expected": [ + "forms\\?title=&field_component_target_id=431" + ] } - ], - "trajectory": "trajectories/", - "related_apps": [ - "chrome" - ], - "evaluator": { - "func":"is_expected_url_pattern_match", - "result": { - "type": "active_tab_info", - "selectors":[ - "application[name=Chromium] entry[name=Address\\ and\\ search\\ bar]" - ], - "goto_prefix": "https://www." - }, - "expected":{ - "type": "rule", - "rules":{ - "expected": ["forms\\?title=&field_component_target_id=431"] - } - } } } } diff --git a/evaluation_examples/examples/chrome/b070486d-e161-459b-aa2b-ef442d973b92.json b/evaluation_examples/examples/chrome/b070486d-e161-459b-aa2b-ef442d973b92.json index 40cc8cf..eee2c9b 100644 --- a/evaluation_examples/examples/chrome/b070486d-e161-459b-aa2b-ef442d973b92.json +++ b/evaluation_examples/examples/chrome/b070486d-e161-459b-aa2b-ef442d973b92.json @@ -1,65 +1,64 @@ { - "id": " b070486d-e161-459b-aa2b-ef442d973b92", - "snapshot": "chrome", - "instruction": "Show side effects of Tamiflu.", - "source": "online_tasks", - "config": [ - { - "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": [ - "https://www.drugs.com/" - ] - } - }, - { - "type": "activate_window", - "parameters": { - "window_name": "Google Chrome" - } + "id": " b070486d-e161-459b-aa2b-ef442d973b92", + "snapshot": "chrome", + "instruction": "Show side effects of Tamiflu.", + "source": "online_tasks", + "config": [ + { + "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": [ + "https://www.drugs.com/" + ] + } + }, + { + "type": "activate_window", + "parameters": { + "window_name": "Google Chrome" + } + } + ], + "trajectory": "trajectories/", + "related_apps": [ + "chrome" + ], + "evaluator": { + "func": "exact_match", + "result": { + "type": "url_dashPart", + "selectors": [ + "application[name=Chromium] entry[name=Address\\ and\\ search\\ bar]" + ], + "goto_prefix": "https://www.", + "partIndex": -1, + "needDeleteId": false, + "returnType": "string" + }, + "expected": { + "type": "rule", + "rules": { + "expected": "tamiflu.html#side-effects" } - ], - "trajectory": "trajectories/", - "related_apps": [ - "chrome" - ], - "evaluator": { - "func":"exact_match", - "result": { - "type": "url_dashPart", - "selectors":[ - "application[name=Chromium] entry[name=Address\\ and\\ search\\ bar]" - ], - "goto_prefix": "https://www.", - "partIndex": -1, - "needDeleteId": false, - "returnType": "string" - }, - "expected":{ - "type": "rule", - "rules":{ - "expected": "tamiflu.html#side-effects" - } - } } } } \ No newline at end of file diff --git a/evaluation_examples/examples/chrome/cabb3bae-cccb-41bd-9f5d-0f3a9fecd825.json b/evaluation_examples/examples/chrome/cabb3bae-cccb-41bd-9f5d-0f3a9fecd825.json index 70586e3..a2d9b1b 100644 --- a/evaluation_examples/examples/chrome/cabb3bae-cccb-41bd-9f5d-0f3a9fecd825.json +++ b/evaluation_examples/examples/chrome/cabb3bae-cccb-41bd-9f5d-0f3a9fecd825.json @@ -1,62 +1,65 @@ { - "id": "cabb3bae-cccb-41bd-9f5d-0f3a9fecd825", - "snapshot": "chrome", - "instruction": "Browse spider-man toys for kids and sort by lowest price.", - "source": "online_tasks", - "config": [ - { - "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": [ - "https://www.kohls.com/" - ] - } - }, - { - "type": "activate_window", - "parameters": { - "window_name": "Google Chrome" - } + "id": "cabb3bae-cccb-41bd-9f5d-0f3a9fecd825", + "snapshot": "chrome", + "instruction": "Browse spider-man toys for kids and sort by lowest price.", + "source": "online_tasks", + "config": [ + { + "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": [ + "https://www.kohls.com/" + ] + } + }, + { + "type": "activate_window", + "parameters": { + "window_name": "Google Chrome" } - ], - "trajectory": "trajectories/", - "related_apps": [ - "chrome" - ], - "evaluator": { - "func":"is_expected_url_pattern_match", - "result": { - "type": "active_url_from_accessTree", - "selectors":[ - "application[name=Chromium] entry[name=Address\\ and\\ search\\ bar]" - ], - "goto_prefix": "https://www." - }, - "expected":{ - "type": "rule", - "rules":{ - "expected": ["AgeAppropriate:Kids", "search=spider-man%20toys", "S=4"] - } - } } - } + ], + "trajectory": "trajectories/", + "related_apps": [ + "chrome" + ], + "evaluator": { + "func": "is_expected_url_pattern_match", + "result": { + "type": "active_url_from_accessTree", + "selectors": [ + "application[name=Chromium] entry[name=Address\\ and\\ search\\ bar]" + ], + "goto_prefix": "https://www." + }, + "expected": { + "type": "rule", + "rules": { + "expected": [ + "AgeAppropriate:Kids", + "search=spider-man%20toys", + "S=4" + ] + } + } + } }