fix(qa): 禁止后台验收启动系统 Google Chrome
This commit is contained in:
@@ -147,14 +147,14 @@ def exercise(page, fixture, out):
|
||||
def 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, help="Optional directory for local screenshots")
|
||||
args = parser.parse_args()
|
||||
if args.out:
|
||||
args.out.mkdir(parents=True, exist_ok=True)
|
||||
fixture = Fixture(args.host, False, False)
|
||||
register_menu(fixture)
|
||||
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:
|
||||
with browser.new_context(service_workers="block", viewport={"width": 1440, "height": 960},
|
||||
|
||||
Reference in New Issue
Block a user