简体   繁体   English

Python Selenium Firefox-不安全的连接错误警报

[英]Python Selenium Firefox - Insecure Connection Error Alert

I am using Python Selenium with FireFox and am struggling to resolve an issue. 我正在将Python Selenium与FireFox结合使用,正在努力解决问题。 Occasionally during a test script I come across a form that submits from https to http which throws this error... 有时在测试脚本中,我遇到了一个表单,该表单从https提交到http,这会引发此错误...

The information you have entered on this page will be sent over an insecure connection and could be read by a third party

I have looked at using driver.switchTo().alert().accept(); 我看过使用driver.switchTo()。alert()。accept(); but it is not working, I assume it's because it's a FireFox generated alert rather than a java one from the site? 但是它不起作用,我认为是因为它是FireFox生成的警报,而不是站点中的Java警报? The error I receive is... 我收到的错误是...

AttributeError: 'WebDriver' object has no attribute 'switchTo'

Anyone have any experience getting around the issue? 任何人都有解决该问题的经验吗?

In Python, it is switch_to . 在Python中,它是switch_to Replace: 更换:

driver.switchTo().alert().accept();

with: 有:

driver.switch_to.alert.accept()

Though, I am not sure this is a regular alert you can switch to this way. 不过,我不确定这是否是常规警报,您可以切换到这种方式。 I suspect the behavior whether show the warning or not is controled via the specific firefox preference. 我怀疑是否显示警告的行为是通过特定的Firefox首选项控制的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Python中不安全的rfcomm连接 - Insecure rfcomm connection in Python Selenium Firefox Webdriver导致错误:连接被拒绝 - Selenium Firefox webdriver results in error: connection refused Firefox in Python Selenium: driver.execute_script attempting to remove text characters with JQuery gives "SecurityError: The operation is insecure" - Firefox in Python Selenium: driver.execute_script attempting to remove text characters with JQuery gives "SecurityError: The operation is insecure" 如何在从 python selenium 脚本打开私人浏览器时禁用“不安全连接”? - How to disable the "Insecure Connection" while opening up a private browser from python selenium script? python硒检测警报错误si活动 - python selenium detect alert error si active Selenium FireFox '此连接不受信任' - Selenium FireFox 'This Connection is Untrusted' 使用 Firefox 无头、Selenium 和 Python 时出错 - Error while using Firefox headless, Selenium and Python 使用Selenium / Python的Firefox驱动程序出现错误 - Error on Firefox Driver using Selenium/Python Python Selenium Firefox了解错误消息 - Python Selenium Firefox understand error message Python Selenium Firefox浏览器启动错误 - Python selenium firefox browser launch error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM