1
votes

I'm developing an automation environment for a specific site..

however, when I navigate to the URL, I'm getting a message of "Your connection is not private"..

I would like to know how can I manage that automatically using selenium? I mean, how can I know through code that the message appeared and how I can navigate to the desired URL?

thanks

2
I don't think you can do that, because that looks like an error from the browser as a result of SSL problems. Selenium can only interact with a webpage that is opened in a browser. I don't think you can use selenium to interact with the browser itself.Krishnan Mahadevan

2 Answers

0
votes
try
{
   //..
}
catch(Exception ex)
{
   if(ex.Message.Contains("Your connection is not private"))
   {
      // what you need to do...
   }
}
0
votes

Try

If(driver.PageSource.Contains("Your connection is not private"))
{
// your code
}