Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/259.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C#Selenium的WebDriver-当前是否有方法设置SetAssumeUntrustedCertificateSuer值_C#_Selenium_Selenium Webdriver_Webdriver - Fatal编程技术网

C#Selenium的WebDriver-当前是否有方法设置SetAssumeUntrustedCertificateSuer值

C#Selenium的WebDriver-当前是否有方法设置SetAssumeUntrustedCertificateSuer值,c#,selenium,selenium-webdriver,webdriver,C#,Selenium,Selenium Webdriver,Webdriver,根据本文件: 我只是想知道有没有办法用C#driver实现这一点 我试过: firefoxProfile.SetPreference("assume_untrusted_certificate_issuer", false); 但这不起作用请记住,当您称之为: profile.SetPreference(preference, value) 您只能调整在键入about:config 在firefox地址栏中 您可以接受C#中不受信任的证书,如下所示: profile.AcceptUntru

根据本文件: 我只是想知道有没有办法用C#driver实现这一点

我试过:

firefoxProfile.SetPreference("assume_untrusted_certificate_issuer", false);

但这不起作用

请记住,当您称之为:

profile.SetPreference(preference, value)
您只能调整在键入
about:config
在firefox地址栏中


您可以接受C#中不受信任的证书,如下所示:

profile.AcceptUntrustedCertificates = true;

请记住,当您称之为:

profile.SetPreference(preference, value)
您只能调整在键入
about:config
在firefox地址栏中


您可以接受C#中不受信任的证书,如下所示:

profile.AcceptUntrustedCertificates = true;

我确实有profile.AcceptUntrustedCertificates=true;但我正在处理上面链接中提供的edge案例,该案例指出:“这可能会给使用与提供服务的主机名不匹配的有效证书测试站点的人带来问题(例如,提供生产证书的测试环境)。添加了FirefoxProfile的附加功能:FirefoxProfile.SetAssumeUntrustedCertificateSuer。使用false调用此函数将关闭错误\u UNTRUSTED位,并允许用户在这种情况下工作。”我应该注意到,我接受了这个答案,因为它是关于以下内容的:config解释了firefoxProfile.SetPreference(preference,value)的正确使用,但如果有人知道通过C#driver访问AssumeUntrustedCertificateSuer选项的方法,我仍在寻找解决此边缘问题的方法;但我正在处理上面链接中提供的edge案例,该案例指出:“这可能会给使用与提供服务的主机名不匹配的有效证书测试站点的人带来问题(例如,提供生产证书的测试环境)。添加了FirefoxProfile的附加功能:FirefoxProfile.SetAssumeUntrustedCertificateSuer。使用false调用此函数将关闭错误\u UNTRUSTED位,并允许用户在这种情况下工作。”我应该注意到,我接受了这个答案,因为关于about:config解释了firefoxProfile.SetPreference(首选项,值)的正确使用,但如果有人知道通过C#驱动程序访问AssumeUntrustedCertificateSuer选项的方法,我仍然在寻找解决这个边缘问题的方法。