fix(qa): 禁止后台验收启动系统 Google Chrome

This commit is contained in:
2026-12-01 20:20:59 +08:00
parent 4101b11aaf
commit e4712895f3
17 changed files with 73 additions and 32 deletions
@@ -164,12 +164,12 @@ def run(browser, args, mobile):
if __name__ == "__main__":
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--host", type=loopback, default="127.0.0.1:5179")
parser.add_argument("--chrome", required=True)
parser.add_argument("--out", type=Path)
args = parser.parse_args()
if args.out:
args.out.mkdir(parents=True, exist_ok=True)
with sync_playwright() as pw, pw.chromium.launch(executable_path=args.chrome, args=[
with sync_playwright() as pw, pw.chromium.launch(headless=True, args=[
"--disable-background-networking", "--disable-quic", "--no-proxy-server",
"--host-resolver-rules=MAP * ~NOTFOUND, EXCLUDE 127.0.0.1"]) as browser:
cases = [run(browser, args, mobile) for mobile in (False, True)]