我正在尝试同时运行多个浏览器,我注意到我无法使用Firefox 44执行它。我已经更新了我的selenium独立服务器。 以下是我在config.js上的脚本
exports.config=
{
directConnect: true,
seleniumAddress:'http://localhost:4444/wd/hub',
capabilities: {
'browserName': 'firefox'
},
我得到的错误如下:
C:\Users\mivy\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-
webdriver\lib\atoms\error.js:113
var template = new Error(this.message);
^
UnknownError: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. F
irefox console output:
454955423474 addons.xpi DEBUG Skipping unavailable install location ap
p-system-share
1454955423474 addons.xpi DEBUG Skipping unavailable install location ap
p-system-local
1454955423475 addons.xpi INFO Mapping {1E2593B2-E106-4697-BCE7-A9D30DE
05D73} to C:\Program Files (x86)\HttpWatch\Firefox
1454955423475 addons.xpi DEBUG checkForChanges
1454955423475 addons.xpi DEBUG Loaded add-on state from prefs: {"app-pr
ofile":{"fxdriver@googlecode.com":{"d":"C:\\Users\\mivy\\AppData\\Local\\Temp\\a
nonymous1228280274538478961webdriver-profile\\extensions\\fxdriver@googlecode.co
m","e":false,"v":"2.45.0","st":1454955418766,"mt":1454955418726}},"app-global":{
"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"C:\\Program Files (x86)\\Mozilla
Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"
v":"44.0","st":1454096785365,"mt":1454096777104}},"winreg-app-global":{"{1E2593B
2-E106-4697-BCE7-A9D30DE05D73}":{"d":"C:\\Program Files (x86)\\HttpWatch\\Firefo
x","e":false,"v":"10.0.27","st":1440422278442,"mt":1438081200000}}}
1454955423489 addons.xpi DEBUG Existing add-on fxdriver@googlecode.com
in app-profile
1454955423489 addons.xpi DEBUG getModTime: Recursive scan of {972ce4c6-
7e08-4474-a285-3208198ce6fd}
1454955423493 addons.xpi DEBUG Existing add-on {972ce4c6-7e08-4474-a285
-3208198ce6fd} in app-global
1454955423493 addons.xpi DEBUG Existing add-on {1E2593B2-E106-4697-BCE7
-A9D30DE05D73} in winreg-app-global
1454955423494 addons.xpi DEBUG getInstallState changed: false, state: {
"app-profile":{"fxdriver@googlecode.com":{"d":"C:\\Users\\mivy\\AppData\\Local\\
Temp\\anonymous1228280274538478961webdriver-profile\\extensions\\fxdriver@google
code.com","e":false,"v":"2.45.0","st":1454955418766,"mt":1454955418726}},"app-gl
obal":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"C:\\Program Files (x86)\\M
ozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}","e"
:true,"v":"44.0","st":1454096785365,"mt":1454096777104}},"winreg-app-global":{"{
1E2593B2-E106-4697-BCE7-A9D30DE05D73}":{"d":"C:\\Program Files (x86)\\HttpWatch\
\Firefox","e":false,"v":"10.0.27","st":1440422278442,"mt":1438081200000}}}
1454955423498 addons.xpi DEBUG No changes found
1454955423505 addons.manager DEBUG Registering shutdown blocker for XPIProv
ider
1454955423505 addons.manager DEBUG Provider finished startup: XPIProvider
1454955423505 addons.manager DEBUG Starting provider: LightweightThemeManag
er
1454955423506 addons.manager DEBUG Registering shutdown blocker for Lightwe
ightThemeManager
1454955423506 addons.manager DEBUG Provider finished startup: LightweightTh
emeManager
1454955423506 addons.manager DEBUG Starting provider: GMPProvider
1454955423510 addons.manager DEBUG Registering shutdown blocker for GMPProv
ider
1454955423510 addons.manager DEBUG Provider finished startup: GMPProvider
1454955423510 addons.manager DEBUG Starting provider: PluginProvider
1454955423510 addons.manager DEBUG Registering shutdown blocker for PluginP
rovider
1454955423510 addons.manager DEBUG Provider finished startup: PluginProvide
r
1454955423511 addons.manager DEBUG Completed startup sequence
1454955423617 addons.xpi-utils DEBUG Starting async load of XPI datab
ase C:\Users\mivy\AppData\Local\Temp\anonymous1228280274538478961webdriver-profi
le\extensions.json
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
1454955423705 addons.manager DEBUG Starting provider: <unnamed-provider>
1454955423705 addons.manager DEBUG Registering shutdown blocker for <unname
d-provider>
1454955423705 addons.manager DEBUG Provider finished startup: <unnamed-prov
ider>
1454955423774 addons.xpi-utils DEBUG Async JSON file read took 0 MS
1454955423774 addons.xpi-utils DEBUG Finished async read of XPI datab
ase, parsing...
1454955423775 addons.xpi-utils DEBUG Successfully read XPI database
1454955423830 addons.manager DEBUG Starting provider: PreviousExperimentPro
vider
1454955423830 addons.manager DEBUG Registering shutdown blocker for Previou
sExperimentProvider
1454955423830 addons.manager DEBUG Provider finished startup: PreviousExper
imentProvider
at new bot.Error (C:\Users\mivy\AppData\Roaming\npm\node_modules\protractor\
node_modules\selenium-webdriver\lib\atoms\error.js:113:18)
at Object.bot.response.checkResponse (C:\Users\mivy\AppData\Roaming\npm\node
_modules\protractor\node_modules\selenium-webdriver\lib\atoms\response.js:106:9)
at C:\Users\mivy\AppData\Roaming\npm\node_modules\protractor\node_modules\se
lenium-webdriver\lib\webdriver\webdriver.js:158:24
at [object Object].promise.ControlFlow.runInFrame_ (C:\Users\mivy\AppData\Ro
aming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\
promise.js:1877:20)
at [object Object].promise.Callback_.goog.defineClass.notify (C:\Users\mivy\
AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\
webdriver\promise.js:2464:25)
at [object Object].promise.Promise.notify_ (C:\Users\mivy\AppData\Roaming\np
m\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.
js:563:12)
at Array.forEach (native)
at Object.goog.array.forEach (C:\Users\mivy\AppData\Roaming\npm\node_modules
\protractor\node_modules\selenium-webdriver\lib\goog\array\array.js:203:43)
at [object Object].promise.Promise.notifyAll_ (C:\Users\mivy\AppData\Roaming
\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promi
se.js:552:16)
at goog.async.run.processWorkQueue (C:\Users\mivy\AppData\Roaming\npm\node_m
odules\protractor\node_modules\selenium-webdriver\lib\goog\async\run.js:125:21)
From: Task: WebDriver.createSession()
at Function.webdriver.WebDriver.acquireSession_ (C:\Users\mivy\AppData\Roami
ng\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\web
driver.js:155:22)
at Function.webdriver.WebDriver.createSession (C:\Users\mivy\AppData\Roaming
\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\webdr
iver.js:129:30)
at [object Object].Builder.build (C:\Users\mivy\AppData\Roaming\npm\node_mod
ules\protractor\node_modules\selenium-webdriver\builder.js:416:22)
at [object Object].DriverProvider.getNewDriver (C:\Users\mivy\AppData\Roamin
g\npm\node_modules\protractor\lib\driverProviders\driverProvider.js:38:7)
at [object Object].Runner.createBrowser (C:\Users\mivy\AppData\Roaming\npm\n
ode_modules\protractor\lib\runner.js:180:37)
at C:\Users\mivy\AppData\Roaming\npm\node_modules\protractor\lib\runner.js:2
56:21
at _fulfilled (C:\Users\mivy\AppData\Roaming\npm\node_modules\protractor\nod
e_modules\q\q.js:797:54)
at self.promiseDispatch.done (C:\Users\mivy\AppData\Roaming\npm\node_modules
\protractor\node_modules\q\q.js:826:30)
at Promise.promise.promiseDispatch (C:\Users\AppData\Roaming\npm\node_m
odules\protractor\node_modules\q\q.js:759:13)
at C:\Users\AppData\Roaming\npm\node_modules\protractor\node_modules\q\
q.js:525:49
[launcher] Process exited with error code 1
我在配置上有什么错过的吗?还是我需要在firefox中升级我的插件?谢谢!
答案 0 :(得分:1)
假设您使用的是Protractor 3.0.0,则应通过将其升级到当前最新的版本43 来解决与Firefox相关的问题。 Firefox 42具有compatibility issues和selenium 2.48。