From ca24d308bde3af4b1bdf85a9d19a2c3153c633d7 Mon Sep 17 00:00:00 2001 From: yuanmengqi Date: Wed, 2 Jul 2025 09:22:42 +0000 Subject: [PATCH] fix chrome finished --- desktop_env/evaluators/getters/chrome.py | 2 +- .../chrome/1704f00f-79e6-43a7-961b-cedd3724d5fd.json | 2 +- .../chrome/2888b4e6-5b47-4b57-8bf5-c73827890774.json | 2 +- .../chrome/b7895e80-f4d1-4648-bee0-4eb45a6f1fa8.json | 12 ++++++------ .../chrome/cabb3bae-cccb-41bd-9f5d-0f3a9fecd825.json | 2 +- .../chrome/f3b19d1e-2d48-44e9-b4e1-defcae1a0197.json | 11 +++++------ evaluation_examples/settings/proxy/dataimpulse.json | 4 ++-- manual_examine.py | 3 ++- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/desktop_env/evaluators/getters/chrome.py b/desktop_env/evaluators/getters/chrome.py index c9c852c..fd9bbf8 100644 --- a/desktop_env/evaluators/getters/chrome.py +++ b/desktop_env/evaluators/getters/chrome.py @@ -1177,7 +1177,7 @@ def get_active_tab_html_parse(env, config: Dict[str, Any]): ], "shell": False}) headers = {"Content-Type": "application/json"} - requests.post("http://" + host + ":" + server_port + "/setup" + "/launch", headers=headers, data=payload) + requests.post("http://" + host + ":" + str(server_port) + "/setup" + "/launch", headers=headers, data=payload) time.sleep(5) browser = p.chromium.connect_over_cdp(remote_debugging_url) target_page = None diff --git a/evaluation_examples/examples/chrome/1704f00f-79e6-43a7-961b-cedd3724d5fd.json b/evaluation_examples/examples/chrome/1704f00f-79e6-43a7-961b-cedd3724d5fd.json index ea61155..0ef3406 100644 --- a/evaluation_examples/examples/chrome/1704f00f-79e6-43a7-961b-cedd3724d5fd.json +++ b/evaluation_examples/examples/chrome/1704f00f-79e6-43a7-961b-cedd3724d5fd.json @@ -1,7 +1,7 @@ { "id": "1704f00f-79e6-43a7-961b-cedd3724d5fd", "snapshot": "chrome", - "instruction": "Find a large car with lowest price from next Monday to next Friday in Zurich.", + "instruction": "Find a large car from next Monday to Friday in Zurich, sorted by price.", "source": "test_task_0", "config": [ { diff --git a/evaluation_examples/examples/chrome/2888b4e6-5b47-4b57-8bf5-c73827890774.json b/evaluation_examples/examples/chrome/2888b4e6-5b47-4b57-8bf5-c73827890774.json index b33b9dd..7bc0fa1 100644 --- a/evaluation_examples/examples/chrome/2888b4e6-5b47-4b57-8bf5-c73827890774.json +++ b/evaluation_examples/examples/chrome/2888b4e6-5b47-4b57-8bf5-c73827890774.json @@ -1,7 +1,7 @@ { "id": "2888b4e6-5b47-4b57-8bf5-c73827890774", "snapshot": "chrome", - "instruction": "Find a men's T-Shirt that is in large size with a stripe pattern, short sleeve and under the Sales&Discount.", + "instruction": "Show me all men's large-size short-sleeve T-shirts with a discount of 50% or more.", "source": "test_task_1", "config": [ { diff --git a/evaluation_examples/examples/chrome/b7895e80-f4d1-4648-bee0-4eb45a6f1fa8.json b/evaluation_examples/examples/chrome/b7895e80-f4d1-4648-bee0-4eb45a6f1fa8.json index 2269fe2..9342e85 100644 --- a/evaluation_examples/examples/chrome/b7895e80-f4d1-4648-bee0-4eb45a6f1fa8.json +++ b/evaluation_examples/examples/chrome/b7895e80-f4d1-4648-bee0-4eb45a6f1fa8.json @@ -49,11 +49,11 @@ "goto_prefix": "https://www.", "category": "xpath", "xpathObject": { - "/html/body/div[1]/main/div[3]/div/div[1]/div[2]/div[1]/div[2]/div/div/div/div/div[1]/div/button/div[3]": "from", - "/html/body/div[1]/main/div[3]/div/div[1]/div[2]/div[1]/div[2]/div/div/div/div/div[2]/button/div[3]": "to", - "/html/body/div[1]/main/div[3]/div/div[1]/div[2]/div[1]/div[1]/div/h1": "city", - "/html/body/div[1]/main/div[3]/div/div[1]/div[2]/div[1]/div[2]/div/div/div/div/div[3]/button/div[3]/span/span[2]": "adult", - "/html/body/div[1]/main/div[3]/div/div[2]/div/div[1]/div/div[2]/div[1]/div/div[1]/div/div[1]/div[2]/div/div[2]/div/button/div/div": "rank" + "/html/body/div[1]/main/div[3]/div[5]/div[2]/div/div[1]/div/div/div/div[1]/div/button/div[3]": "from", + "/html/body/div[1]/main/div[3]/div[5]/div[2]/div/div[1]/div/div/div/div[2]/button/div[3]": "to", + "/html/body/div[1]/main/div[3]/div[2]/div/div[1]/div/h2": "city", + "/html/body/div[1]/main/div[3]/div[5]/div[2]/div/div[1]/div/div/div/div[3]/button/div[3]/span/span[2]": "adult", + "/html/body/div[1]/main/div[3]/div[5]/div[2]/div/div[3]/div/div[2]/div/div/div[2]/div/button/div/div": "rank" } }, "expected": { @@ -67,7 +67,7 @@ "from": "{DoW}, {Month} {Day0D}", "to": "{DoW}, {Month} {Day0D}", "city": "New York City Hotels", - "adult": "2 adults", + "adult": "2 guests", "rank": "Price (low to high)" } } 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 ec98f63..b1298ad 100644 --- a/evaluation_examples/examples/chrome/cabb3bae-cccb-41bd-9f5d-0f3a9fecd825.json +++ b/evaluation_examples/examples/chrome/cabb3bae-cccb-41bd-9f5d-0f3a9fecd825.json @@ -79,5 +79,5 @@ } } }, - "proxy": false + "proxy": true } \ No newline at end of file diff --git a/evaluation_examples/examples/chrome/f3b19d1e-2d48-44e9-b4e1-defcae1a0197.json b/evaluation_examples/examples/chrome/f3b19d1e-2d48-44e9-b4e1-defcae1a0197.json index 8bcd64e..70c3da7 100644 --- a/evaluation_examples/examples/chrome/f3b19d1e-2d48-44e9-b4e1-defcae1a0197.json +++ b/evaluation_examples/examples/chrome/f3b19d1e-2d48-44e9-b4e1-defcae1a0197.json @@ -1,7 +1,7 @@ { "id": "f3b19d1e-2d48-44e9-b4e1-defcae1a0197", "snapshot": "chrome", - "instruction": "Find help page about buying tickets.", + "instruction": "Find the FAQ page about ticket delivery.", "source": "test_task_0", "config": [ { @@ -27,7 +27,7 @@ "type": "chrome_open_tabs", "parameters": { "urls_to_open": [ - "https://seatgeek.com/" + "https://premier.ticketek.com.au/" ] } }, @@ -45,17 +45,16 @@ "evaluator": { "func": "is_expected_url_pattern_match", "result": { - "type": "active_tab_info", - "goto_prefix": "https://www." + "type": "active_tab_info" }, "expected": { "type": "rule", "rules": { "expected": [ - "Buying-Tickets" + "Ticket-Delivery-FAQs" ] } } }, - "proxy": true + "proxy": false } \ No newline at end of file diff --git a/evaluation_examples/settings/proxy/dataimpulse.json b/evaluation_examples/settings/proxy/dataimpulse.json index d7f1cfb..5f7c0a4 100644 --- a/evaluation_examples/settings/proxy/dataimpulse.json +++ b/evaluation_examples/settings/proxy/dataimpulse.json @@ -2,8 +2,8 @@ { "host": "gw.dataimpulse.com", "port": 823, - "username": "67e5faf31654b923f06b", - "password": "26a3158d346abdfa", + "username": "e750e5abb74376d28361", + "password": "e5ec245537e1e76a", "protocol": "http", "provider": "dataimpulse", "type": "residential", diff --git a/manual_examine.py b/manual_examine.py index 8e8eaf2..ddd69b7 100644 --- a/manual_examine.py +++ b/manual_examine.py @@ -266,7 +266,8 @@ def main(): screen_size=(args.screen_width, args.screen_height), headless=args.headless, os_type="Ubuntu", - require_a11y_tree=args.observation_type in ["a11y_tree", "screenshot_a11y_tree", "som"] + require_a11y_tree=args.observation_type in ["a11y_tree", "screenshot_a11y_tree", "som"], + enable_proxy=True ) # 执行手动检查