【问题标题】:I am using FF 52.0.1 Selenium 3.3.1 gecko driver 0.15.0我正在使用 FF 52.0.1 Selenium 3.3.1 壁虎驱动程序 0.15.0
【发布时间】:2017-03-22 16:45:52
【问题描述】:

我正在使用 FF 52.0.1 Selenium 3.3.1 gecko 驱动程序 v0.15.0

当我运行测试用例时,我得到了这个异常:

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
1490199380254   addons.manager  DEBUG   Application has been upgraded
1490199380292   addons.manager  DEBUG   Loaded provider scope for resource://gre/modules/addons/XPIProvider.jsm: ["XPIProvider"]
1490199380294   addons.manager  DEBUG   Loaded provider scope for resource://gre/modules/LightweightThemeManager.jsm: ["LightweightThemeManager"]
1490199380298   addons.manager  DEBUG   Loaded provider scope for resource://gre/modules/addons/GMPProvider.jsm
1490199380300   addons.manager  DEBUG   Loaded provider scope for resource://gre/modules/addons/PluginProvider.jsm
1490199380300   addons.manager  DEBUG   Starting provider: XPIProvider
1490199380300   addons.xpi  DEBUG   startup
1490199380301   addons.xpi  INFO    Mapping fxdriver@googlecode.com to C:\Users\TGUDUG~1\AppData\Local\Temp\anonymous1718988216671391891webdriver-profile\extensions\fxdriver@googlecode.com
1490199380301   addons.xpi  DEBUG   Ignoring file entry whose name is not a valid add-on ID: C:\Users\TGUDUG~1\AppData\Local\Temp\anonymous1718988216671391891webdriver-profile\extensions\webdriver-staging
1490199380302   addons.xpi  INFO    SystemAddonInstallLocation directory is missing
1490199380302   addons.xpi  INFO    Mapping e10srollout@mozilla.org to C:\Program Files (x86)\Mozilla Firefox\browser\features\e10srollout@mozilla.org.xpi
1490199380303   addons.xpi  INFO    Mapping firefox@getpocket.com to C:\Program Files (x86)\Mozilla Firefox\browser\features\firefox@getpocket.com.xpi
1490199380303   addons.xpi  INFO    Mapping webcompat@mozilla.org to C:\Program Files (x86)\Mozilla Firefox\browser\features\webcompat@mozilla.org.xpi
1490199380304   addons.xpi  INFO    Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to C:\Program Files (x86)\Mozilla Firefox\browser\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi
1490199380304   addons.xpi  DEBUG   Skipping unavailable install location app-system-share
1490199380305   addons.xpi  DEBUG   Skipping unavailable install location app-system-local
1490199380305   addons.xpi  INFO    Mapping {f176abfa-5be8-4b97-b851-d694e62fde1f} to C:\Program Files (x86)\Zoiper\ClickToDial\FireFox
1490199380305   addons.xpi  DEBUG   checkForChanges
1490199380306   addons.xpi  DEBUG   Loaded add-on state from prefs: {}
1490199380306   addons.xpi  DEBUG   New add-on fxdriver@googlecode.com in app-profile

谁能帮帮我?

【问题讨论】:

标签: java selenium firefox selenium-webdriver webdriver


【解决方案1】:

可能 7055 被其他进程使用,因此您必须关闭它。

使用此答案搜索:How can you find out which process is listening on a port on Windows?

并关闭该进程并重试。

【讨论】:

    【解决方案2】:

    尝试使用 64 位 Firefox 52 版本,并为 selenium3.3.1 和 jdk1.8 64 位使用 64 位 geckodriver

    profile.setPreference("browser.tabs.remote.autostart", false); profile.setPreference("browser.tabs.remote.autostart.1", false); profile.setPreference("browser.tabs.remote.autostart.2", false); profile.setPreference("browser.tabs.remote.force-enable", "false");

    【讨论】:

      猜你喜欢
      • 2017-07-30
      • 2018-09-07
      • 2017-08-15
      • 2018-01-20
      • 1970-01-01
      • 2018-06-19
      • 2018-03-17
      • 2020-08-23
      • 2020-03-10
      相关资源
      最近更新 更多