Reputation: 416
I'm trying to bypass the Security Certificate page for Microsoft Edge for Selenium Webdriver using Python.
I attempted solutions that worked for previous versions of Internet Explorer that I found at this thread, but none of them worked.
driver.get("javascript:document.getElementById('overridelink').click();");
It seems like something close to the code above would probably work, but the Security Certificate page on Microsoft Edge is clearly different in some way.
Upvotes: 2
Views: 4552
Reputation: 416
There are a few things you need to do to get past this Security Certificate screen.
i.e. C:\PythonXX\Lib\site-packages\selenium\webdriver\common
In the section of your code that encounters the Security Certificate page, verify you’re on the Security Certificate page and use javascript to select the continue option.
if "Certificate error" in driver.title:
driver.get("javascript:document.getElementById('invalidcert_continue').click()")
The name of the object responsible for continuing passed the Security Certificate page is different for Microsoft Edge than it is for IE. Hope this helps.
Upvotes: 3