I am trying to automate a task which has to be done about 50 to 100 times a day. What I want to achieve is to open the corresponding website, login using a certificate, fill in two fields and click on submit.
I can figure out how to open the website and fill in the correct fields with the data using find element by xpath. However, I cannot manage to automate the login with the certificate. The login via the certificate is a pop-up within Google Chrome where I have to click OK or press the enter button (the machine I'm working on has only 1 certificate so it's automatically selected). The issue is that the login pop-up does not seem to be part of Chrome, I cannot find the xpath of the "OK" button.
At the moment I have the following code:
from selenium import webdriver
import time
driver = webdriver.Chrome()
driver.get('https://example.com')
Does anyone know in what direction I should move foreward?
Thanks!
Resolved the issue by defining what certificate to select on a specific website. This resolves the pop-up issue and will auto-login each time. From github:
"If you are using Google Chrome and Client SSL Cert and you are tired of constantly selecting certificates, try this:
{"pattern":"https://[*.]example.com","filter":{"ISSUER":{"CN":"example.com"}}}
original source: https://gist.github.com/IngussNeilands/3bbbb7d78954c85e2e988cf3bfec7caa