geckodriver版本
0.16.1
Firefox版本
53.0.2(32位)
怎么了:
当我尝试在不安全的页面上自动登录时,firefox会打开一个新选项卡" https://support.mozilla.org/1/firefox/53.0.2/WINNT/pt-PT/insecure-password ".
我怎么能禁用它?我认为属性"security.insecure_field_warning.contextual.enabled"与此行为有关,但我不知道如何通过python代码禁用它.
我尝试以下代码但没有成功:
[...]
firefox_driver = path_drivers + "geckodriver.exe"
profile = webdriver.FirefoxProfile()
profile.set_preference("security.insecure_field_warning.contextual.enabled", False)
return webdriver.Firefox(executable_path=firefox_driver, firefox_profile=profile)
Run Code Online (Sandbox Code Playgroud)
首选项不会更改,在about:config上保留True值.
任何的想法?
最好的祝福,
鲁本桑托斯