fix chrome finished
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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": [
|
||||
{
|
||||
|
||||
@@ -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": [
|
||||
{
|
||||
|
||||
@@ -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)"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,5 +79,5 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"proxy": false
|
||||
"proxy": true
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -2,8 +2,8 @@
|
||||
{
|
||||
"host": "gw.dataimpulse.com",
|
||||
"port": 823,
|
||||
"username": "67e5faf31654b923f06b",
|
||||
"password": "26a3158d346abdfa",
|
||||
"username": "e750e5abb74376d28361",
|
||||
"password": "e5ec245537e1e76a",
|
||||
"protocol": "http",
|
||||
"provider": "dataimpulse",
|
||||
"type": "residential",
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
# 执行手动检查
|
||||
|
||||
Reference in New Issue
Block a user