我在RHEL 6.4上使用firefox用于selenium脚本。为此,我使用了selenium 2.48.2,2.49版本但我找不到与这些selenium版本兼容的firefox版本。我正在使用Xming在Windows上从linux触发firefox。请任何人都可以为firefox驱动程序与selenium 2.49或2.48.2兼容提供一些帮助。我已经尝试过firefox 39,41,43,44版本,但我收到以下异常 -
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
iding the updated system add-ons.
1456292657904 addons.manager DEBUG Registering startup change 'installed' for fxdriver@googlecode.com
1456292657904 addons.xpi-utils DEBUG Make addon app-profile:fxdriver@googlecode.com visible
1456292657905 DeferredSave.extensions.json DEBUG Save changes
1456292657905 addons.xpi-utils DEBUG Make addon app-global:{972ce4c6-7e08-4474-a285-3208198ce6fd} visible
1456292657905 DeferredSave.extensions.json DEBUG Save changes
1456292657906 addons.xpi DEBUG Updating XPIState for `{"id":"fxdriver@googlecode.com","syncGUID":"RdhxVFQ80wzQ","location":"app-profile","version":"2.48.0","type":"extension","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Firefox WebDriver","description":"WebDriver implementation for Firefox","creator":"Simon Stewart","homepageURL":null},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"/tmp/anonymous3945461434748043456webdriver-profile/extensions/fxdriver@googlecode.com","installDate":1456292633000,"updateDate":1456292633000,"applyBackgroundUpdates":1,"bootstrap":false,"size":3213569,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":true,"hasBinaryComponents":true,"strictCompatibility":false,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"3.0","maxVersion":"45.0"}],"targetPlatforms":[{"os":"Darwin","abi":null},{"os":"SunOS","abi":null},{"os":"FreeBSD","abi":null},{"os":"OpenBSD","abi":null},{"os":"WINNT","abi":"x86-msvc"},{"os":"Linux","abi":null}],"multiprocessCompatible":false,"signedState":0}
1456292657907 addons.xpi DEBUG getModTime: Recursive scan of fxdriver@googlecode.com
1456292657909 addons.xpi DEBUG Updating XPIState for {"id":"{972ce4c6-7e08-4474-a285-3208198ce6fd}","syncGUID":"B6gLC6ZQUiLs","location":"app-global","version":"43.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":"/opt/firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}","installDate":1449604917000,"updateDate":1449604917000,"applyBackgroundUpdates":1,"skinnable":true,"size":5022,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":true,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"43.0","maxVersion":"43.0"}],"targetPlatforms":[]}
1456292657910 addons.xpi DEBUG getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
1456292657911 DeferredSave.extensions.json DEBUG Save changes
1456292657911 addons.xpi DEBUG Updating database with changes to installed add-ons
1456292657911 addons.xpi-utils DEBUG Updating add-on states
1456292657912 addons.xpi-utils DEBUG Writing add-ons list
1456292657923 addons.manager DEBUG Registering shutdown blocker for XPIProvider
1456292657924 addons.manager DEBUG Provider finished startup: XPIProvider
1456292657924 addons.manager DEBUG Starting provider: LightweightThemeManager
1456292657924 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager
1456292657925 addons.manager DEBUG Provider finished startup: LightweightThemeManager
1456292657926 addons.manager DEBUG Starting provider: GMPProvider
1456292657932 addons.manager DEBUG Registering shutdown blocker for GMPProvider
1456292657932 addons.manager DEBUG Provider finished startup: GMPProvider
1456292657932 addons.manager DEBUG Starting provider: PluginProvider
1456292657933 addons.manager DEBUG Registering shutdown blocker for PluginProvider
1456292657933 addons.manager DEBUG Provider finished startup: PluginProvider
1456292657934 addons.manager DEBUG Completed startup sequence
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:123)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:271)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:117)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:216)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:211)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:207)`
另外我可以发现selenium 2.41正在使用firefox 30版本,但我想使用selenium 2.49所以我想要2.49版本的兼容firefox。
答案 0 :(得分:0)
以下是更改日志:https://github.com/SeleniumHQ/selenium/blob/master/dotnet/CHANGELOG
Firefox v41应该可以与selenium 2.49
一起使用答案 1 :(得分:0)
Firefox v42可以正常运行。我在两个版本中都使用了v42
答案 2 :(得分:0)
如果您的意图是使用任何本机事件调用,例如31.6.0 ESR
或driver.navigate()
,则在版本2.48的CHANGELOG notes中说明您必须使用不晚于Firefox element.click()
的版本。 {{1}}。
如果您打开浏览器并使用合成的非本机事件和Javascript来浏览网址和/或点击内容,那么是的,所有更高版本的Firefox都适合您。