From 87b0cc530c70a85b7f0e398f571f3f0d2ac2fdf7 Mon Sep 17 00:00:00 2001 From: divdavem Date: Fri, 16 Jul 2021 16:33:20 +0200 Subject: [PATCH] feat(cli): add --ignore-https-errors option (#7671) --- src/cli/cli.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cli/cli.ts b/src/cli/cli.ts index 557ff2849d..39659e66cd 100755 --- a/src/cli/cli.ts +++ b/src/cli/cli.ts @@ -258,6 +258,7 @@ type Options = { colorScheme?: string; device?: string; geolocation?: string; + ignoreHttpsErrors?: boolean; lang?: string; loadStorage?: string; proxyServer?: string; @@ -364,6 +365,9 @@ async function launchContext(options: Options, headless: boolean, executablePath if (options.loadStorage) contextOptions.storageState = options.loadStorage; + if (options.ignoreHttpsErrors) + contextOptions.ignoreHTTPSErrors = true; + // Close app when the last window closes. const context = await browser.newContext(contextOptions); @@ -532,6 +536,7 @@ function commandWithOpenOptions(command: string, description: string, options: a .option('--color-scheme ', 'emulate preferred color scheme, "light" or "dark"') .option('--device ', 'emulate device, for example "iPhone 11"') .option('--geolocation ', 'specify geolocation coordinates, for example "37.819722,-122.478611"') + .option('--ignore-https-errors', 'ignore https errors') .option('--load-storage ', 'load context storage state from the file, previously saved with --save-storage') .option('--lang ', 'specify language / locale, for example "en-GB"') .option('--proxy-server ', 'specify proxy server, for example "http://myproxy:3128" or "socks5://myproxy:8080"')