确定FirefoxProfile是否接受不受信任的证书

时间:2016-06-03 17:13:52

标签: java selenium webdriver

如何检查Firefox配置文件是否接受不受信任的证书?

我知道您可以使用以下代码将其设置为true / false:

    FirefoxProfile profile = new FirefoxProfile();
    profile.setAcceptUntrustedCertificates(false);

但是,如何确定FirefoxProfile设置的内容?

1 个答案:

答案 0 :(得分:0)

引用docs

  

public void setAcceptUntrustedCertificates(boolean acceptUntrustedSsl)

     

设置Firefox是否应接受具有的SSL证书   已过期,由未知权威机构签署或通常不受信任。   默认设置为 true

因此,除非您将其更改为false,否则它已经是真的,并且在使用控件时应该知道的代码已更改标记。