0

I am unable to pass through SSH Certificate is in Firefox. Every time I execute my code it gives a warning and then I have to manually accept and proceed. My code is working fine but not sure why it is still not able to bypass SSH.

Code which I am using :

from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from getpass import getpass

username = input("Enter you Username:")
password = getpass("Enter you password:")

profile = webdriver.FirefoxProfile()
profile.accept_untrusted_certs = True

driver = webdriver.Firefox(firefox_profile=profile,executable_path=r'C:\\webdriver\\geckodriver.exe')
driver.get("https://directory.corp.intranet/cmsviewer/login.html?page=/cmsviewer/MAL/index.html%3Fkey%3DY8P-CRS")

cuid_user = driver.find_element_by_name("f_loginname")
cuid_user.send_keys(username)

password_cuid = driver.find_element_by_name("f_loginpassword")
password_cuid.send_keys(password)

enter_button = driver.find_element_by_name("frm_login")
enter_button.submit()

Every time I run the code on my new Firefox pop window I have to manually accept the Risk and continue.

enter image description here Every time after execution I have to accept and proceed. This I need to bypass. Any idea guys? Guys please help!!!!

Below image is screenshot of the same.

Community
  • 1
  • 1
Prakash
  • 1
  • 1
  • This isn't SSH, you're probably thinking an SSL certificate – C.Nivs May 18 '20 at 19:40
  • try desired_capabilities['acceptSslCerts'] = True – n.qber May 18 '20 at 19:57
  • @C.Nivs kindly look into the screenshot image and do suggest what I should be doing. – Prakash May 19 '20 at 19:08
  • @n.qber I tried using desired_capabilities['acceptSslCerts'] = True.... issue remains same. Let me know if anything else i should try. Attached screenshot for the issue i am facing. – Prakash May 19 '20 at 19:10
  • I was searching and I found this https://stackoverflow.com/questions/24507078/how-to-deal-with-certificates-using-selenium – n.qber May 20 '20 at 11:09
  • @n.qber thanks for pointing me to that chain. Although I tried every step I still am unable to solve the issue. And I would require a 50 reputation to comment on that page. Let me know if you find any other solution for this. I have updated the code above with certificate parameters. – Prakash May 20 '20 at 20:59

0 Answers0