-2

I am trying to access the secured site, to access the site installed the signed certificate. While automating using selenium, every time it is prompting to select certificate and grant permission pop up like.

enter image description here

and next pop up is enter image description here

Please suggest me how to accept the certificate. I tried with alert – but it is not taking as alert. With window handler I can able read the text of the popup, but unable to do any action like “accept permission” Robot key events also not working.

  • Create a profile that has accepted any certificates and then load that profile when you launch the driver. – JeffC Oct 31 '17 at 14:56

1 Answers1

1

Accepting the certificate is not something you can do with Webdriver as the pop up is out of its scope. The only way we found how to do this was by changing the Chrome Policy Templates.

You can find what policies exist (if any) by browsing to chrome://policy in a chrome browser.

There is a very good article here How to install Chrome policy templates on Windows machines on how to do this in Windows.

The principal is similar in Linux where you can modify the policy in /etc/opt/chrome/policies/managed. A article here describes this more fully.

We used a very open value i.e., {"pattern":"*","filter":{}} in our policy, you would be well advised to make it tighter to avoid security holes, especially if you're connected to external networks (we aren't).