我按照以下步骤创建了一个firefox配置文件:
1. firefox.exe -ProfileManager -no-remote
2. New profile created with name CM
3. open the new profile and add the certificate
现在从我的selenium web驱动程序自动化脚本调用此配置文件
FirefoxProfile firefoxProfile = new FirefoxProfile();
ProfilesIni allProfiles = new ProfilesIni();
firefoxProfile = allProfiles.getProfile("CM");
firefoxProfile.setAcceptUntrustedCertificates(true);
firefoxProfile.setAssumeUntrustedCertificateIssuer(false);
driver = new FirefoxDriver(firefoxProfile);
但仍然得到不受信任的证书错误。
提前致谢,