Selenium WebDriver не подключается к Firefox 20

Я использую selenium-server-standalone-2.28.0.jar. Запустил концентратор и запустил прослушиватель с помощью следующей команды

"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 avg@toolbar 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 и обнаружил, что веб-драйвер Firefox несовместим с Firefox 20.0. Текущая версия веб-дирвера Firefox — 2.28.0.

Какую последнюю версию Firefox я могу использовать или есть ли альтернатива этой проблеме?


person user1984004PRI    schedule 04.04.2013    source источник
comment
Попробуйте Selenium версии 2.32. Он отлично работает для Firefox 20.   -  person MilanYadav    schedule 09.05.2013


Ответы (3)


вместо этого используйте последнюю версию. пока 2.32.0

см. http://docs.seleniumhq.org/download/ или скачайте напрямую http://selenium.googlecode.com/files/selenium-server-standalone-2.32.0.jar

меня устраивает

person Lazy Ants    schedule 11.04.2013

Firefox 20 только что вышел, поэтому разработчикам Selenium, вероятно, потребуется несколько дней, чтобы исправить все возникшие проблемы совместимости.

Последняя версия Selenium — 2.31.0 (доступна здесь), которая будет работать с Фаерфокс 19.0.2. Любая версия Selenium ниже 2.30.0 не будет работать с FireFox 19 и выше, поэтому я предлагаю вам сначала попробовать обновить Selenium до последней версии.

Чтобы было ясно, я еще не загрузил и не попробовал FireFox 20, поэтому я не знаю, насколько совместим с ним Selenium 2.31.0.

person Ardesco    schedule 05.04.2013

У меня убунту 12.04 64бит. Selenium перестал работать после недавнего обновления до 20. Я использовал Eclipse (JDK 7). Я изменил Eclipse.ini, чтобы вместо этого использовать JDK 6, и он начал работать. Webdriver время от времени зависает, но большую часть времени работает (это может быть проблема и с веб-сайтом, который я тестирую). На всякий случай я отключил автообновление Firefox.

person Balajee    schedule 07.04.2013