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
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
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:
In Playwright Sharp:
var context = await browser.NewContextAsync(new BrowserNewContextOptions { IgnoreHTTPSErrors = true });
Adding --ignore-https-errors worked for me
npx playwright codegen https://localhost/ --ignore-https-errors