简体   繁体   中英

Selenium webdriver fails to start with Firefox 26+

I was using selenium 2.35 with previous versions of firefox before it got updated to version firefox 26.0.My tests were running fine previously but now I end up getting the following error.

 org.openqa.selenium.firefox.NotConnectedException: 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\VISHAL~1.SIN\AppData\Local\Temp\anonymous4627406201097696285webdriver-profile\extensions\webdriver-staging
*** LOG addons.xpi: checkForChanges
*** LOG addons.xpi-utils: Opening XPI database C:\Users\VISHAL~1.SIN\AppData\Local\Temp\anonymous4627406201097696285webdriver-profile\extensions.json
*** LOG addons.xpi: New add-on fxdriver@googlecode.com installed in app-profile
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
*** LOG addons.xpi-utils: Make addon app-profile:fxdriver@googlecode.com visible
*** LOG DeferredSave/extensions.json: Save changes
*** LOG DeferredSave/extensions.json: Save changes
*** LOG addons.xpi: New add-on {9F17B1A2-7317-49ef-BCB7-7BB47BDE10F8} installed in winreg-app-user
*** LOG addons.xpi-utils: Make addon winreg-app-user:{9F17B1A2-7317-49ef-BCB7-7BB47BDE10F8} visible
*** LOG DeferredSave/extensions.json: Save changes
*** LOG DeferredSave/extensions.json: Save changes
*** LOG addons.xpi: New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} installed in app-global
*** LOG addons.xpi-utils: Make addon app-global:{972ce4c6-7e08-4474-a285-3208198ce6fd} visible
*** LOG DeferredSave/extensions.json: Save changes
*** LOG DeferredSave/extensions.json: Save changes
*** LOG addons.xpi: New add-on {9F17B1A2-7317-49ef-BCB7-7BB47BDE10F8} installed in winreg-app-global
*** LOG DeferredSave/extensions.json: Save changes
*** LOG addons.xpi: New add-on mgsusageagent@managesoft.com installed in winreg-app-global
*** LOG addons.xpi-utils: Make addon winreg-app-global:mgsusageagent@managesoft.com visible
*** LOG DeferredSave/extensions.json: Save changes
*** LOG DeferredSave/extensions.json: Save changes
*** 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 DeferredSave/extensions.json: Starting timer
*** LOG DeferredSave/extensions.json: Starting write
*** LOG DeferredSave/extensions.json: Write succeeded
*** LOG addons.xpi-utils: XPI Database saved, setting schema version preference to 15
*** LOG addons.manager: shutdown
*** LOG addons.xpi: shutdown
*** LOG addons.xpi-utils: shutdown
*** LOG addons.xpi: Notifying XPI shutdown observers
*** LOG addons.manager: Async provider shutdown done
*** 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\VISHAL~1.SIN\AppData\Local\Temp\anonymous4627406201097696285webdriver-profile\extensions\webdriver-staging
*** LOG addons.xpi: checkForChanges
*** LOG addons.xpi: No changes found
JavaScript error: chrome://browser/content/urlbarBindings.xml, line 654: aUrl is undefined

I tried to downgrade the version of firefox but am unable to get any previous versions from the mozilla site.

I also tried all the selenium versions 2.36,2.37,2.38,2.39 but none of them seems to be compatible with firefox 26.0. There are errors in the code once I try to replace the selenium 2.35 with 2.36 to 2.39. These errors disappear when I replace again with 2.35.

Can anybody help me with the compatible versions of Selenium and Firefox?

你可以使用2.XX的任何版本的selenium,但只有我们只能使用firefox25或firefox 14.01到17.XX的限制

The reason for the:

Unable to connect to host 127.0.0.1 on port 7055

error is that the version of Selenium Server does not know how to work with the newer version of Firefox. You need to download a newer version of the Selenium Server that supports the newer version of Firefox.

See: Unable to connect to host 127.0.0.1 on port 7055 at GitHub .

Firefox 26与selenium 2.39一起使用

<seleniumVersion>2.39.0</seleniumVersion>

使用firefox 25,它在FF25上运行正常

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM