microsoft / playwright-dotnet

.NET version of the Playwright testing and automation library.
https://playwright.dev/dotnet/
MIT License
2.47k stars 235 forks source link

[Question]: Not able to launch Firebox error because of Microsoft.Playwright.PlaywrightException: 'SEC_ERROR_UNKNOWN_ISSUER #1742

Closed anunay1 closed 3 years ago

anunay1 commented 3 years ago

Your question

I am trying to launch Firefox but receive the error in the subject line. how to I use the option IgnoreHTTPSErrors = true.

if I try to use, I get the below error:

image

mxschmitt commented 3 years ago

IgnoreHTTPSErrors is a context option, you can pass it in NewPageAsync which internally creates a context. See here: https://playwright.dev/dotnet/docs/next/api/class-browser#browser-new-context-option-ignore-https-errors

mxschmitt commented 3 years ago

You need to call context.NewPageAsync() to get the page. Currently you only have a context.

See here: https://playwright.dev/dotnet/docs/core-concepts/#browser-contexts