小编典典

到达错误页面:尝试导航到其他选项卡时,如果该选项卡下有表单提交,则约为:neterror

selenium

当我使用Selenium进行自动化测试时,遇到一个问题,这是所有场景:

页面顶部有几个选项卡,现在,我想单击这些选项卡并填写这些选项卡下的所有表单,但是如果我在formA下方提交这些选项卡tabA,那么我将无法自动导航至其他选项卡。如果我不提交表单数据,则不会发生此问题。这是日志:

1513753361368 Marionette DEBUG Received DOM event "beforeunload" for "https://192.168.1.20/link.cgi?1513753343333"
1513753361388 Marionette DEBUG Received DOM event "beforeunload" for "https://192.168.1.20/link.cgi?1513753343333"
1513753361391 Marionette DEBUG Received DOM event "pagehide" for "https://192.168.1.20/link.cgi?1513753343333"
1513753361391 Marionette DEBUG Received DOM event "unload" for "https://192.168.1.20/link.cgi?1513753343333"
1513753361427 Marionette DEBUG Received DOM event "DOMContentLoaded" for "about:neterror?e=connectionFailure&u=https%3A//192.168.1.20/network.cgi&c=UTF-8&f=regular&d=Firefox%20%E6%97%A0%E6%B3%95%E5%BB%BA%E7%AB%8B%E5%88%B0%20192.168.1.20%20%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%9A%84%E8%BF%9E%E6%8E%A5%E3%80%82"
org.openqa.selenium.WebDriverException: Reached error page: about:neterror?e=connectionFailure&u=https%3A//192.168.1.20/network.cgi&c=UTF-8&f=regular&d=Firefox%20%E6%97%A0%E6%B3%95%E5%BB%BA%E7%AB%8B%E5%88%B0%20192.168.1.20%20%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%9A%84%E8%BF%9E%E6%8E%A5%E3%80%82
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T18:33:54.468Z'
System info: host: 'PC-20161127KZEG', ip: '192.168.131.1', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_111'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 57.0.2, javascriptEnabled: true, moz:accessibilityChecks: false, moz:headless: false, moz:processID: 42248, moz:profile: C:\Users\Administrator\AppD..., moz:webdriverClick: false, pageLoadStrategy: normal, platform: XP, platformName: XP, platformVersion: 6.1, rotatable: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}}

阅读 361

收藏
2020-06-26

共1个答案

小编典典

此错误消息…

org.openqa.selenium.WebDriverException: Reached error page: about:neterror?e=connectionFailure&u=https%3A//192.168.1.20/network.cgi&c=UTF-8&f=regular&d=Firefox%20%E6%97%A0%E6%B3%95%E5%BB%BA%E7%AB%8B%E5%88%B0%20192.168.1.20%20%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%9A%84%E8%BF%9E%E6%8E%A5%E3%80%82

…表示在初始化 WebDriver / Web浏览 会话时出现 网络错误

然而,主要的问题是,在这些情况下 网络错误有效绝对 URL 预计为 webdriver的 情况下,即在 驾驶员
返回值 成功 用的值null,按照更新GO命令规格
WebDriver 应该返回 错误,错误代码未知error

Selenium团队
通过Issue#4475仍未解决此问题,
GeckoDriver团队将
通过Issue#770解决问题,具体取决于
Mozilla发行 ID#1312679

2020-06-26