When going to a specific site and logging in, it then requires me (through a prompt which I can't access the web elements of) to validate it using a specific certificate to authenticate myself. The certificate itself already appears to be loaded but the issue is just submitting / clicking the "Ok" response.
So, I've tried looking online and there does appear to be answers but they conflict with me. I'm running Chrome in headless mode which doesn't allow me to use the autoit
or pyautogui
libs. I have the certificate itself in my Keychain and also within my VSCode but not sure how I'd supply that to my driver to perhaps get rid of that prompt.
Here's a portion of my code:
def webdriverSetup():
chrome_options = Options()
#chrome_options.add_argument('--headless')
chrome_options.add_argument("--window-size=1920,1080")
chrome_options.add_argument('--ignore-certificate-errors')
chrome_options.add_argument('--allow-running-insecure-content')
chrome_options.add_argument("--disable-gpu")
chrome_options.add_argument("--no-sandbox")
driver = webdriver.Chrome(options=chrome_options)
return driver
Here's the prompt I'm referring to:
Note: Some of the other answers found are exclusive to Windows. Would appreciate a Mac or "mixed" solution for the time being, thanks.