2

Thanks for your help in advance.... So I am testing an application and when I try to visit the url using chromedriver, the application prompts me to accept the SSL certificate(Security reasons). Is there a way to click ok on that prompt using selenium, or is there a way to automate that somehow? I know how to handle other prompt but just not able to click ok on that prompt.

Please advice... I am now wondering if this is something that can be automated or is it better for me to bypass and not get prompted for that cert...

I am trying to accept a trusted cert Cert

hershey14
  • 27
  • 5
  • See similar question here: [How to stop Chrome's Select a certificate window](https://stackoverflow.com/questions/40653785/how-to-stop-chromes-select-a-certificate-window/44455445#44455445) – llstooling Jun 09 '17 at 10:49

2 Answers2

0

You have to add --ignore-certificate-errors ChromeOptions() argument:

Look at that post there is right answer for your question.

Community
  • 1
  • 1
pdeveloper
  • 26
  • 1
  • 3
  • Thanks for the quick reply, I am aware of ignoring and accepting using desired capabilites but I have edited my post up and added a pic to show what cert I am trying to accept cvan you please advise... thanks:) – hershey14 Feb 23 '16 at 10:06
0

This should help. (C#)

try
{
   IAlert alert = driver.SwitchTo().Alert();
   alert.Accept();
}
catch (Exception ex)
{}
Leon Barkan
  • 2,676
  • 2
  • 19
  • 43