Selenium firefox - WebDriverException: Reached error page: about:certerror

人走茶凉 提交于 2019-12-06 03:27:05

As in this bug mentioned Support for untrusted/self-signed certificates will be available starting with Firefox 52, we need to wait until Firefox 52 is not released.


Solution :- For now, as alternate solution we need to use existing Firefox profile where the certificate for untrusted/self-signed URL is already added into Firefox's exception list.

How to create custom Firefox profile for selenium?

  • Launch Firefox using existing profile as :-

    System.setProperty("webdriver.gecko.driver", "path/to/geckodriver")
    
    ProfilesIni profile = new ProfilesIni();
    FirefoxProfile myprofile = profile.getProfile("created Profile Name");
    
    WebDriver driver = new FirefoxDriver(myprofile);
    driver.get("untrusted/self-signed URL");
    
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!