python selenium firefox handle ssl bypass 1

python selenium firefox handle ssl bypass

 #NOT the correct way and it doesn't work EVERY time, but it works for me
from selenium import webdriver
driver = webdriver.Firefox()
site ='https://your-site.pt'
try:
    driver.get(site)
    time.sleep(4)
except:
    Button = driver.find_element_by_id("enableTls10Button") 
    Button.click()
   #NOT the correct way and it doesn't work EVERY time, but it works for me

Here is what the above code is Doing:
1. It opens a Firefox browser
2. It goes to the site
3. It waits 4 seconds
4. If it doesn’t work, it clicks on the button that enables TLS 1.0

Similar Posts