2013-04-04 77 views
10

我使用的是selenium-server-standalone-2.28.0.jar。 推出的枢纽和 使用以下命令Selenium WebDriver未与Firefox连接20

"C:\Program Files (x86)\Java\jre7\bin\Java.exe" -jar selenium-server-standalone-2.28.0.jar -role webdriver -hub http://localhost:4444/grid/register -port 5557 -browser "browserName=firefox",maxInstances=5,platform=WINDOWS,javaScriptEnabled=true,TAKES_SCREENSHOT=true 

打开一个空白的Firefox窗口中启动监听器和则显示以下错误:

Execute 
System.InvalidOperationException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: 
*** LOG addons.manager: Application has been upgraded 
*** LOG addons.xpi: startup 
*** LOG addons.xpi: Skipping unavailable install location app-system-local 
*** LOG addons.xpi: Skipping unavailable install location app-system-share 
*** LOG addons.xpi: Ignoring file entry whose name is not a valid add-on ID:   C:\Users\PR~1.GRO\AppData\Local\Temp\anonymous768293325561108937webdriver-profile\extensions\webdriver-staging 
*** LOG addons.xpi: checkForChanges 
*** LOG addons.xpi-utils: Opening database 
*** LOG addons.xpi-utils: Creating database schema 
*** LOG addons.xpi: New add-on [email protected] installed in app-profile 
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled 
*** LOG addons.xpi: New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} installed in app-global 
*** LOG addons.xpi: New add-on [email protected] installed in winreg-app-global 
*** LOG addons.xpi: New add-on [email protected] installed in winreg-app-global 
*** LOG addons.xpi: New add-on [email protected] installed in winreg-app-global 
*** LOG addons.xpi: Updating database with changes to installed add-ons 
*** LOG addons.xpi-utils: Updating add-on states 
*** LOG addons.xpi-utils: Writing add-ons list 
*** LOG addons.manager: shutdown 
*** LOG addons.xpi: shutdown 
*** LOG addons.xpi-utils: shutdown 
*** LOG addons.xpi-utils: Database closed 
*** LOG addons.xpi: startup 
*** LOG addons.xpi: Skipping unavailable install location app-system-local 
*** LOG addons.xpi: Skipping unavailable install location app-system-share 
*** LOG addons.xpi: Ignoring file entry whose name is not a valid add-on ID: C:\Users\PR~1.GRO\AppData\Local\Temp\anonymous768293325561108937webdriver-profile\extensions\webdriver-staging 
*** LOG addons.xpi: checkForChanges 
*** LOG addons.xpi: No changes found 

at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line 1002 
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line 844 
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line 809 
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line 85 
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(Uri remoteAddress, ICapabilities desiredCapabilities, TimeSpan commandTimeout) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line 117 
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(Uri remoteAddress, ICapabilities desiredCapabilities) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line 106 
at SHL.Test.Selenium.ScreenShotRemoteWebDriver..ctor(Uri remoteAddress, ICapabilities desiredCapabilities) in C:\Preethi\vs1\WebTest\SeleniumWebTest\Framework\SHL.Test.Selenium\ScreenShotRemoteWebDriver.cs:line 9 
at SHL.Test.Selenium.TestContext..ctor(Action testRun, ITestEnvironment testEnvironment, DesiredCapabilities desiredCapabilities) in C:\Preethi\vs1\WebTest\SeleniumWebTest\Framework\SHL.Test.Selenium\TestContext.cs:line 31 
at SHL.Test.Selenium.TestBase.InitSelenium(DesiredCapabilities desiredCapabilities, ITestEnvironment testEnvironment, Action testRun) in C:\Preethi\vs1\WebTest\SeleniumWebTest\Framework\SHL.Test.Selenium\TestBase.cs:line 112 

在调试,去火狐浏览器插件列表,发现Firefox的webDriver与Firefox不兼容20.0 当前的Firefox webdirver版本是2.28.0

我可以使用哪种最新版本的Firefox?这个问题的任何替代方法?

+0

尝试硒版本2.32.It工作正常的Firefox 20。 – MilanYadav 2013-05-09 08:57:34

回答

1

Firefox 20刚刚问世,Selenium的开发人员可能需要几天的时间才能修复弹出的兼容性问题。

最新版本的Selenium是2.31.0(可用here),它可以与Firefox 19.0.2一起使用。任何版本的Selenium低于2.30.0都不适用于FireFox 19及更高版本,因此我建议您先尝试将Selenium更新至最新版本。

要清楚我还没有下载并尝试过FireFox 20,所以我不知道Selenium 2.31.0如何兼容它。

0

我有Ubuntu 12.04 64位。硒最近更新到20后停止工作。我正在使用Eclipse(JDK 7)。我将Eclipse.ini改为使用JDK 6,它开始工作。 网络驱动程序暂时挂起,但大部分时间都在工作(这也可能是我正在测试的网站的问题)。为了安全起见,我现在禁用了Firefox自动更新。

相关问题