'Playwright not accepting https urls while openinign with codegen command
npx playwright codegen https:/// page.goto: net::ERR_CERT_AUTHORITY_INVALID at ...
how can i open https url through codegen command by passing input params or auth credentials
Solution 1:[1]
See the custom codegen setup documentation here. Based on that error you will likely need to add chrome launch argument: --ignore-certificate-errors and set ignoreHTTPSErrors: true in the launch options. Codegen can also preserve authenticated state by running with --save-storage flag.
Source:
Solution 2:[2]
In Playwright Sharp:
var context = await browser.NewContextAsync(new BrowserNewContextOptions { IgnoreHTTPSErrors = true });
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Nico Mee |
| Solution 2 | r590 |
