I'm new to Selenium (for C#), and I have the following problem: I want to navigate to a specific URL that, IMMEDIATELY after having loaded the page, shows the classic confirmation window for a certificate.
I hoped the following code would have solved the issue, but it is not true: infact until the confirmation window exists the code does not proceed (and so it stucks at i.Navigate...)
IWebDriver i = new InternetExplorerDriver(pathDriver);
i.Url = urlToBeLoaded;
i.Navigate(); // it stucks here!
i.SwitchTo().Alert().Accept();
If I don't manually accept the certificate the code does not continue with i.SwitchTo()... but under this condition the Accept is obviously completely useless!
Does someone know a way to solve this problem?
At Selenium can't deal with Confirm Certificate popup in IE someone suggested to disable pop-ups, but according to me it would be preferable to solve the problem...