当我在firefox中运行量角器测试时,Selenium无法启动。该 依赖版本详细信息指定如下:
让我知道出了什么问题,我错过了什么?
节点版本:v4.3.1
量角器版本:3.2.1
Karma版本:0.13.21
Selenium版本:2.52.0
Firefox版本:47.0.1
Firefox控制台输出:
C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\error.js:27
super(opt_error);
^
WebDriverError: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
MlocE","location":"winreg-app-global","version":"15.1.0","type":"extension","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{},"iconURL":"chrome://vscore/content/ScriptFF.gif","icon64URL":null,"defaultLocale":{"name":"McAfee ScriptScan for Firefox","description":null,"creator":"McAfee, Inc.","homepageURL":null},"visible":true,"active":false,"userDisabled":true,"appDisabled":false,"descriptor":"C:\\Program Files (x86)\\Common Files\\McAfee\\SystemCore","installDate":1465363824840,"updateDate":1465363824840,"applyBackgroundUpdates":1,"bootstrap":false,"skinnable":false,"size":2695168,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":true,"hasBinaryComponents":false,"strictCompatibility":false,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"1.5","m
1467645009572 DeferredSave.extensions.json DEBUG Save changes
1467645009572 addons.xpi DEBUG Updating database with changes to installed add-ons
1467645009572 addons.xpi-utils DEBUG Updating add-on states
1467645009579 addons.xpi-utils DEBUG Writing add-ons list
1467645009586 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\e10srollout@mozilla.org.xpi
1467645009587 addons.xpi DEBUG Calling bootstrap method startup on e10srollout@mozilla.org version 1.0
1467645009587 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\firefox@getpocket.com.xpi
1467645009588 addons.xpi DEBUG Calling bootstrap method startup on firefox@getpocket.com version 1.0.2
1467645009589 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\loop@mozilla.org.xpi
1467645009590 addons.xpi DEBUG Calling bootstrap method startup on loop@mozilla.org version 1.3.2
1467645009609 addons.manager DEBUG Registering shutdown blocker for XPIProvider
1467645009609 addons.manager DEBUG Provider finished startup: XPIProvider
1467645009610 addons.manager DEBUG Starting provider: LightweightThemeManager
1467645009610 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager
1467645009610 addons.manager DEBUG Provider finished startup: LightweightThemeManager
1467645009610 addons.manager DEBUG Starting provider: GMPProvider
1467645009616 addons.manager DEBUG Registering shutdown blocker for GMPProvider
1467645009617 addons.manager DEBUG Provider finished startup: GMPProvider
1467645009617 addons.manager DEBUG Starting provider: PluginProvider
1467645009617 addons.manager DEBUG Registering shutdown blocker for PluginProvider
1467645009617 addons.manager DEBUG Provider finished startup: PluginProvider
1467645009618 addons.manager DEBUG Completed startup sequence
1467645009955 addons.manager DEBUG Starting provider: <unnamed-provider>
1467645009955 addons.manager DEBUG Registering shutdown blocker for <unnamed-provider>
1467645009955 addons.manager DEBUG Provider finished startup: <unnamed-provider>
1467645010210 DeferredSave.extensions.json DEBUG Write succeeded
1467645010210 addons.xpi-utils DEBUG XPI Database saved, setting schema version preference to 17
1467645010210 DeferredSave.extensions.json DEBUG Starting timer
1467645010247 DeferredSave.extensions.json DEBUG Starting write
1467645010259 addons.repository DEBUG No addons.json found.
1467645010260 DeferredSave.addons.json DEBUG Save changes
1467645010263 DeferredSave.addons.json DEBUG Starting timer
1467645010426 addons.manager DEBUG Starting provider: PreviousExperimentProvider
1467645010426 addons.manager DEBUG Registering shutdown blocker for PreviousExperimentProvider
1467645010426 addons.manager DEBUG Provider finished startup: PreviousExperimentProvider
1467645010431 DeferredSave.addons.json DEBUG Starting write
1467645010455 DeferredSave.extensions.json DEBUG Write succeeded
1467645010505 DeferredSave.addons.json DEBUG Write succeeded
at WebDriverError (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\error.js:27:10)
at Object.checkLegacyResponse (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\error.js:580:13)
at C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:64:13
at Promise.invokeCallback_ (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1329:14)
at TaskQueue.execute_ (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2790:14)
at TaskQueue.executeNext_ (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2773:21)
at C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2652:27
at C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:639:7
at process._tickCallback (node.js:364:9)
From: Task: WebDriver.createSession()
at acquireSession (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:62:22)
at Function.createSession (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:295:12)
at Builder.build (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\builder.js:458:24)
at [object Object].DriverProvider.getNewDriver (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\built\driverProviders\driverProvider.js:42:27)
at [object Object].Runner.createBrowser (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\built\runner.js:203:37)
at C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\built\runner.js:293:21
at _fulfilled (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:796:13)
at C:\Users\tester\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:604:44
[launcher] Process exited with error code 1
答案 0 :(得分:2)
Firefox 47的compatibility issues与selenium webdriver 2.53(你有2.52,但我认为它仍然是一个问题)。您需要downgrade Firefox to 46.0.1或安装包含此修复程序的Firefox的最新开发版本。
或/和,你应该升级Protractor 到最新版本(目前是3.3.0),这将带来最新的selenium-webdriver
包(注意:量角器试图同步最新更新selenium-webdriver
,但3.3.0具体为depends on the same 2.52.0,而其中有2.53.2 - 下一个3.4.0 will have that installed)。