0

我正在尝试使用以下配置运行自动化脚本。

配置:

  • 硒java 2.53.0

  • Selenium 服务器 2.53.0

  • JRE 7 火狐 49.0

  • geckodriver-v0.11.1-win64

Firefox 已打开,但不是脚本无法输入 URL。

在此处输入图像描述

请参考以下错误跟踪:

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
ey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{"32":"icon.png","48":"icon.png"},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Default","description":"The default 
Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi","installDate":1477028214411,"updateDate":1477028214411,"applyBackgroundUpdates":1,"skinnable":true,"size":21905,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":true,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"49.0.2","maxVersion":"49.0.2"}],"targetPlatforms":[],"seen":true}
1478243939636   addons.xpi  DEBUG   getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}

如果需要更多信息,请告诉我。

4

1 回答 1

3

Selenium 2.53.1 及更早版本不适用于 FF 4.7 及更早版本。您需要将 Selenium 更新到 3.0.2,下载 Firefox 47.1 和老版本<下载 Gecko 驱动程序(在 FF 47 和老版本中运行测试)并保持冷静。

硒变更日志

v3.0.0

重要变化

  • Firefox 仅在 47.0.1 或更早版本完全支持。geckodriver 提供对更高版本的 firefox 的支持,它基于不断发展的 W3C WebDriver 规范,并使用该规范中的有线协议,如有更改,恕不另行通知。
  • 您可能希望选择 ESR 版本,例如 45.4.0esr 或更早版本。
  • 根本不支持 Firefox 47.0.0。
于 2016-11-04T07:55:28.893 回答