Automating SSL client-side certificates in Firefox and Selenium testing

前端 未结 2 2030
日久生厌
日久生厌 2020-12-09 19:24

Is it possible to test client side SSL certificates with Selenium and any browser? E.g. Can you create a web driver and give dummy certificates for it? Or use a prepared Fir

2条回答
  •  生来不讨喜
    2020-12-09 20:13

    I dont know if this helps, but you can change some of the preferences in the profile. In Java, you could do this.

    ProfilesIni allProfiles = new ProfilesIni();
        FirefoxProfile profile = allProfiles.getProfile("default"); //change profile name. there is a note somewhere on how to change it
        profile.setPreference(uaKey, uaValue);
        profile.setAcceptUntrustedCertificates(acceptUntrustedSsl);
    

    I am not sure this is what you need.

提交回复
热议问题