microsoft / playwright-python

Python version of the Playwright testing and automation library.
https://playwright.dev/python/
Apache License 2.0
12.02k stars 926 forks source link

[Question]: the 'NET ::ERR_SSL_OBSOLETE_VERSION' error has a form of bypass? #1078

Closed cloudgedti closed 2 years ago

cloudgedti commented 2 years ago

Your question

Hi, I'm trying to access a website that displays this error in all browsers due to the use of old versions of TLS technology in the website development, but even with that I need to continue the project. Is there any way to configure the browser to no longer display this message?

website: https://satsp.fazenda.sp.gov.br/

mxschmitt commented 2 years ago

You can use ignore_https_errors, example:

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch()
    page = browser.new_page(ignore_https_errors=True)
    page.goto("https://satsp.fazenda.sp.gov.br//")
    page.screenshot(path="example.png")
    browser.close()

See here: https://playwright.dev/python/docs/api/class-browser#browser-new-context-option-ignore-https-errors