fix(qa): 禁止后台验收启动系统 Google Chrome
This commit is contained in:
@@ -4,7 +4,7 @@ from pathlib import Path
|
||||
from urllib.parse import urlsplit, parse_qs
|
||||
from playwright.sync_api import expect, sync_playwright
|
||||
p = argparse.ArgumentParser()
|
||||
p.add_argument('--chrome', required=True)
|
||||
|
||||
p.add_argument('--out', required=True, type=Path)
|
||||
args = p.parse_args()
|
||||
args.out.mkdir(exist_ok=True, parents=True)
|
||||
@@ -14,7 +14,7 @@ foreign = []
|
||||
failed = []
|
||||
passed = []
|
||||
with sync_playwright() as pw:
|
||||
browser = pw.chromium.launch(executable_path=args.chrome, args=['--disable-background-networking', '--no-proxy-server', '--host-resolver-rules=MAP * ~NOTFOUND, EXCLUDE 127.0.0.1'])
|
||||
browser = pw.chromium.launch(headless=True, args=['--disable-background-networking', '--no-proxy-server', '--host-resolver-rules=MAP * ~NOTFOUND, EXCLUDE 127.0.0.1'])
|
||||
ctx = browser.new_context(viewport={'width': 1440, 'height': 1000}, service_workers='block', color_scheme='light')
|
||||
pg = ctx.new_page()
|
||||
pg.set_default_timeout(7000)
|
||||
|
||||
Reference in New Issue
Block a user