我使用selenium 2.35与之前版本的firefox更新到版本firefox 26.0之前.我的测试以前运行正常,但现在我最终收到以下错误.
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
我试图降级firefox的版本,但无法从mozilla网站获得任何以前的版本.
我也尝试了所有的selenium版本2.36,2.37,2.38,2.39,但它们似乎都没有与firefox 26.0兼容.一旦我尝试用2.36到2.39替换selenium 2.35,代码中就会出现错误.当我再次使用2.35替换时,这些错误消失了.
任何人都可以帮助我使用Selenium和Firefox的兼容版本吗?
你可以使用2.XX的任何版本的selenium,但只有我们只能使用firefox25或firefox 14.01到17.XX的限制
原因是:
无法在端口7055上连接到主机127.0.0.1
错误是Selenium Server的版本不知道如何使用较新版本的Firefox.您需要下载支持较新版本Firefox的较新版本的Selenium Server.
请参阅:无法在GitHub上的端口7055上连接到主机127.0.0.1.