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

我从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.(RemoteWebDriver.java:116) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:223) 

根据我的经验,Selenium Webdriver不支持最新版本的Firefox。 尝试降级到较少的先前版本。 您可以尝试检查Selenium的CHANGELOG ,它们指的是一些可能有用的版本。

然后,如果您想要特定的以前版本的Firefox,请转到他们以前的版本页面 。

尝试使用带有本机事件支持的firefox 33的selenium 2.48.2。 但到目前为止,它将一直运行到firefox 41。 欲了解更多信息,请查看以下链接>> https://raw.githubusercontent.com/SeleniumHQ/selenium/master/dotnet/CHANGELOG

我有一个问题,几个版本回到Firefox升级后根本没有工作,即使它似乎没有其他任何问题。

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

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

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