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})
|
], "shell": False})
|
||||||
|
|
||||||
headers = {"Content-Type": "application/json"}
|
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)
|
time.sleep(5)
|
||||||
browser = p.chromium.connect_over_cdp(remote_debugging_url)
|
browser = p.chromium.connect_over_cdp(remote_debugging_url)
|
||||||
target_page = None
|
target_page = None
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "1704f00f-79e6-43a7-961b-cedd3724d5fd",
|
"id": "1704f00f-79e6-43a7-961b-cedd3724d5fd",
|
||||||
"snapshot": "chrome",
|
"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",
|
"source": "test_task_0",
|
||||||
"config": [
|
"config": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "2888b4e6-5b47-4b57-8bf5-c73827890774",
|
"id": "2888b4e6-5b47-4b57-8bf5-c73827890774",
|
||||||
"snapshot": "chrome",
|
"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",
|
"source": "test_task_1",
|
||||||
"config": [
|
"config": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -49,11 +49,11 @@
|
|||||||
"goto_prefix": "https://www.",
|
"goto_prefix": "https://www.",
|
||||||
"category": "xpath",
|
"category": "xpath",
|
||||||
"xpathObject": {
|
"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[5]/div[2]/div/div[1]/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[5]/div[2]/div/div[1]/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[2]/div/div[1]/div/h2": "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[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/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[3]/div/div[2]/div/div/div[2]/div/button/div/div": "rank"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"expected": {
|
"expected": {
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
"from": "{DoW}, {Month} {Day0D}",
|
"from": "{DoW}, {Month} {Day0D}",
|
||||||
"to": "{DoW}, {Month} {Day0D}",
|
"to": "{DoW}, {Month} {Day0D}",
|
||||||
"city": "New York City Hotels",
|
"city": "New York City Hotels",
|
||||||
"adult": "2 adults",
|
"adult": "2 guests",
|
||||||
"rank": "Price (low to high)"
|
"rank": "Price (low to high)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,5 +79,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"proxy": false
|
"proxy": true
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "f3b19d1e-2d48-44e9-b4e1-defcae1a0197",
|
"id": "f3b19d1e-2d48-44e9-b4e1-defcae1a0197",
|
||||||
"snapshot": "chrome",
|
"snapshot": "chrome",
|
||||||
"instruction": "Find help page about buying tickets.",
|
"instruction": "Find the FAQ page about ticket delivery.",
|
||||||
"source": "test_task_0",
|
"source": "test_task_0",
|
||||||
"config": [
|
"config": [
|
||||||
{
|
{
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
"type": "chrome_open_tabs",
|
"type": "chrome_open_tabs",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"urls_to_open": [
|
"urls_to_open": [
|
||||||
"https://seatgeek.com/"
|
"https://premier.ticketek.com.au/"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -45,17 +45,16 @@
|
|||||||
"evaluator": {
|
"evaluator": {
|
||||||
"func": "is_expected_url_pattern_match",
|
"func": "is_expected_url_pattern_match",
|
||||||
"result": {
|
"result": {
|
||||||
"type": "active_tab_info",
|
"type": "active_tab_info"
|
||||||
"goto_prefix": "https://www."
|
|
||||||
},
|
},
|
||||||
"expected": {
|
"expected": {
|
||||||
"type": "rule",
|
"type": "rule",
|
||||||
"rules": {
|
"rules": {
|
||||||
"expected": [
|
"expected": [
|
||||||
"Buying-Tickets"
|
"Ticket-Delivery-FAQs"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"proxy": true
|
"proxy": false
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
{
|
{
|
||||||
"host": "gw.dataimpulse.com",
|
"host": "gw.dataimpulse.com",
|
||||||
"port": 823,
|
"port": 823,
|
||||||
"username": "67e5faf31654b923f06b",
|
"username": "e750e5abb74376d28361",
|
||||||
"password": "26a3158d346abdfa",
|
"password": "e5ec245537e1e76a",
|
||||||
"protocol": "http",
|
"protocol": "http",
|
||||||
"provider": "dataimpulse",
|
"provider": "dataimpulse",
|
||||||
"type": "residential",
|
"type": "residential",
|
||||||
|
|||||||
@@ -266,7 +266,8 @@ def main():
|
|||||||
screen_size=(args.screen_width, args.screen_height),
|
screen_size=(args.screen_width, args.screen_height),
|
||||||
headless=args.headless,
|
headless=args.headless,
|
||||||
os_type="Ubuntu",
|
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