Amrou
Amrou

Reputation: 489

How to handle the "Select a certificate" windows pop-up with for chrome selenium webdriver with python

I am trying to get an url using webriver from selenium.

The url requires a certificate generated by my company and needs to be installed manually.

The problem is that I can't find a way to confirm the certificate using selenium webdriver, but also the fact that the code hangs up on driver.get(URL) and can no longer execute any further lines of code. The pop up is not an element of the browser.

from selenium import webdriver

driver = webdriver.Chrome()
driver.get (URL)

I can't share the URL because it's confidential.

EDIT

I managed to workaround this by loading creating a profile of the browser that has the certificate installed. Then I just need to load the profile and continue working.

Upvotes: 0

Views: 1085

Answers (1)

Saurabh Bhatewara
Saurabh Bhatewara

Reputation: 110

Use pyautogui library to handle popup window. You can pass keyboard keys and handle the popup.

Upvotes: 1

Related Questions