2

I have UI application which for which I had build Test Automation Framework using Selenium Python Pytest Framework. When I launch web application, a pop window appears where I have to select valid PKI Test Certificate, after which only the application opens up. As this authentication pop-up is windows based and cannot be authenticated using selenium webdriver, can someone suggest any solution by which I can pass the .p12 certificate and password and the application can be accessed. I tried to use service_args in phantom js, which works very well.

def phantomJsDriver():
    headlessDriver = webdriver.PhantomJS(executable_path='../drivers/phantomjs.exe', service_args=['--ignore-ssl-errors=true', '--ssl-client-certificate-file=<path of .pem file>', '--ssl-client-key-file=<path of key file>', '--ssl-client-key-passphrase=<passphrase>'])
    headlessDriver.set_window_size(1280, 1024)
    return headlessDriver

But same thing is not working in case of chrome or edge chromium. Can someone please provide any solution for this?

0 Answers0