Selenium 2.48.2 + firefox 42 +浏览器未实例化

时间:2015-11-14 08:47:46

标签: java firefox selenium

我已从2.46.0升级到Selenium 2.48.2,并已将firefox升级到最新版本42.升级后,浏览器未实例化。

所有项目都会发生这种情况。我也尝试降级firefox和selenium,但它没有帮助。

请建议!!

以下是错误:

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
addons.xpi-utils    DEBUG   Make addon app-global:{972ce4c6-7e08-4474-a285-3208198ce6fd} visible
1447491412018   DeferredSave.extensions.json    DEBUG   Save changes
1447491412018   DeferredSave.extensions.json    DEBUG   Save changes
1447491412018   addons.xpi  DEBUG   Updating XPIState for {"id":"{972ce4c6-7e08-4474-a285-3208198ce6fd}","syncGUID":"OsOdnf_TnA9t","location":"app-global","version":"42.0","type":"theme","internalName":"classic/1.0","updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Default","description":"The default theme.","creator":"Mozilla","homepageURL":null,"contributors":["Mozilla Contributors"]},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}","installDate":1447489593709,"updateDate":1447489593709,"applyBackgroundUpdates":1,"skinnable":true,"size":24301,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":true,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"42.0","maxVersion":"42.0"}],"targetPlatforms":[]}
1447491412018   addons.xpi  DEBUG   getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
1447491412020   addons.xpi  DEBUG   New add-on fiddlerhook@fiddler2.com installed in winreg-app-global
1447491412030   addons.xpi  WARN    Disabling foreign installed add-on fiddlerhook@fiddler2.com in winreg-app-global
1447491412030   addons.xpi-utils    DEBUG   Make addon winreg-app-global:fiddlerhook@fiddler2.com visible
1447491412030   DeferredSave.extensions.json    DEBUG   Save changes
1447491412030   DeferredSave.extensions.json    DEBUG   Save changes
1447491412030   addons.xpi  DEBUG   Updating XPIState for {"id":"fiddlerhook@fiddler2.com","syncGUID":"mZKE2ni5yBIT","location":"winreg-app-global","version":"2.5.1.8","type":"extension","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":"chrome://fiddlerhook/content/about.xul","iconURL":"chrome://fiddlerhook/content/fiddlerhook.png","icon64URL":null,"defaultLocale":{"name":"FiddlerHook","description":"Integrate Fiddler into Firefox","creator":"Telerik","homepageURL":"https://fiddler2.com/r/?FIDDLERHOOKHELP"},"visible":true,"active":false,"userDisabled":true,"appDisabled":false,"descriptor":"C:\\Program Files (x86)\\Fiddler2\\FiddlerHook","installDate":1441879129965,"updateDate":1441879129965,"applyBackgroundUpdates":1,"bootstrap":false,"size":33903,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":true,"hasBinaryComponents":false,"strictCompatibility":false,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"4.0","maxVersion":"42.*"}],"targetPlatforms":[],"multiprocessCompatible":false,"signedState":0}
1447491412031   addons.xpi  DEBUG   Updating database with changes to installed add-ons
1447491412031   addons.xpi-utils    DEBUG   Updating add-on states
1447491412037   addons.xpi-utils    DEBUG   Writing add-ons list
1447491412059   addons.manager  DEBUG   Registering shutdown blocker for XPIProvider
1447491412059   addons.manager  DEBUG   Provider finished startup: XPIProvider
1447491412059   addons.manager  DEBUG   Starting provider: LightweightThemeManager
1447491412059   addons.manager  DEBUG   Registering shutdown blocker for LightweightThemeManager
1447491412059   addons.manager  DEBUG   Provider finished startup: LightweightThemeManager
1447491412060   addons.manager  DEBUG   Starting provider: GMPProvider
1447491412066   addons.manager  DEBUG   Registering shutdown blocker for GMPProvider
1447491412067   addons.manager  DEBUG   Provider finished startup: GMPProvider
1447491412067   addons.manager  DEBUG   Starting provider: PluginProvider
1447491412067   addons.manager  DEBUG   Registering shutdown blocker for PluginProvider
1447491412067   addons.manager  DEBUG   Provider finished startup: PluginProvider
1447491412068   addons.manager  DEBUG   Completed startup sequence

    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:122)
    at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:276)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:116)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:223)

4 个答案:

答案 0 :(得分:2)

根据我的经验,Selenium Webdriver不支持最新版本的Firefox。尝试降级到较少的先前版本。您可以尝试查看Selenium的CHANGELOG,在那里他们会参考一些可能会有效的版本。

然后,如果您想要特定的以前版本的Firefox,请转到他们的previous versions page

答案 1 :(得分:1)

尝试使用具有本机事件支持的firefox 33的selenium 2.48.2。但截至目前,它将一直运行到firefox 41。 有关详细信息,请查看以下链接&gt;&gt; https://raw.githubusercontent.com/SeleniumHQ/selenium/master/dotnet/CHANGELOG

答案 2 :(得分:0)

我遇到了一些问题,即使在其他人没有遇到任何问题的情况下,在Firefox升级之后它还没有工作。

我清除了个人资料并开始为我工作,然后我将cookie数据库复制到新的配置文件中,因为这是一个很难重建的要求。

答案 3 :(得分:0)

在这种情况下,您有两种解决方案:

  1. 降级你的firefox和selenium版本(例如我目前使用selenium 2.46.0和FF 41.0.1),
  2. 将FF升级到43.0版本,可与selenium 2.48.2
  3. 一起使用