1

While I'm trying to record the web based application using Playwright tool and after launching the application getting as NET::ERR_CERT_AUTHORITY_INVALID enter image description here.

After recording and in the playwright tool the application url code is not getting recorded.enter image description here

getting error as enter image description here

2 Answers 2

0

If you trust the domain, or are using your own self-signed certificate, this error can be avoided by adding ignoreHTTPSError: true when creating the context:

... = browser.newContext({ ignoreHTTPSErrors: true });

or in Python

... = browser.new_context(ignore_https_errors=True)

or in C#

... = browser.NewContextAsync(new BrowserNewContextOptions { IgnoreHTTPSErrors = true });

Or when starting codegen:

playwright codegen https://localhost/ --ignore-https-errors
0

First approach : Request your development team to update the SSL certificate , since it has expired . Which is causing the error NET::ERR_CERT_AUTHORITY_INVALID

Second approach Use the below code to ignore any HTTPSErrors (Would recommend doing the below only if first approach is not doable by your development or IT team)

    const newBrowser = await chromium.launch();
    const context = await newBrowser.newContext({
        ignoreHTTPSErrors: true
    });
    const page = await context.newPage();
    await page.goto(URL); 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.