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)
偏好设置没有改变,在about:config中仍然保持True值。
有什么想法吗?
最好的问候,
鲁本·桑托斯