我有一个angularJS项目,我正在使用以下grunt命令执行e2e量角器测试:
grunt测试:e2e
我为chrome,firefox和internet explorer设置了multiCapabilities。我的protractor.conf.js文件如下:
(function () {
'use strict';
exports.config = {
// Files that contains e2e tests
specs: ['*.js'],
// All browser that will be used on e2d tests
multiCapabilities: [{
'browserName': 'chrome'
}, {
'browserName': 'firefox'
}, {
'browserName': 'internet explorer'
}],
// Application's url
baseUrl: 'http://localhost:9001/app/view/',
// Test framework
framework: 'jasmine'
};
})();
但是它出错了,日志错误信息是:
c:\REPOSITORIOS\OficinaTA\site>grunt test:e2e
Running "selenium_start" task
seleniumrc webdriver ready on 127.0.0.1:4444
Running "connect:test" (connect) task
Started connect web server on http://localhost:9001
Running "protractor:e2e" (protractor) task
[launcher] Running 3 instances of WebDriver
------------------------------------
[internet explorer #3] PID: 14484
[internet explorer #3] Starting selenium standalone server...
[internet explorer #3] Selenium standalone server started at http://10.10.6.26:5
8941/wd/hub
[internet explorer #3]
[internet explorer #3] c:\REPOSITORIOS\OficinaTA\site\node_modules\protractor\no
de_modules\selenium-webdriver\lib\atoms\error.js:108
[internet explorer #3] var template = new Error(this.message);
[internet explorer #3] ^
[internet explorer #3] UnknownError: Unexpected error launching Internet Explore
r. Protected Mode settings are not the same for all zones. Enable Protected Mode
must be set to the same value (enabled or disabled) for all zones. (WARNING: Th
e server did not provide any stacktrace information)
[internet explorer #3] Command duration or timeout: 2.13 seconds
[internet explorer #3] Build info: version: '2.47.1', revision: '411b314', time:
'2015-07-30 03:03:16'
[internet explorer #3] System info: host: 'DSES026', ip: '10.10.6.26', os.name:
'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_65'
[internet explorer #3] Driver info: org.openqa.selenium.ie.InternetExplorerDrive
r
[internet explorer #3] at new bot.Error (c:\REPOSITORIOS\OficinaTA\site\node
_modules\protractor\node_modules\selenium-webdriver\lib\atoms\error.js:108:18)
[internet explorer #3] at Object.bot.response.checkResponse (c:\REPOSITORIOS
\OficinaTA\site\node_modules\protractor\node_modules\selenium-webdriver\lib\atom
s\response.js:109:9)
[internet explorer #3] at c:\REPOSITORIOS\OficinaTA\site\node_modules\protra
ctor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:160:24
[internet explorer #3] at [object Object].promise.ControlFlow.runInFrame_ (c
:/REPOSITORIOS/OficinaTA/site/node_modules/protractor/node_modules/selenium-webd
river/lib/goog/../webdriver/promise.js:1857:20)
[internet explorer #3] at [object Object].goog.defineClass.notify (c:/REPOSI
TORIOS/OficinaTA/site/node_modules/protractor/node_modules/selenium-webdriver/li
b/goog/../webdriver/promise.js:2448:25)
[internet explorer #3] at [object Object].promise.Promise.notify_ (c:/REPOSI
TORIOS/OficinaTA/site/node_modules/protractor/node_modules/selenium-webdriver/li
b/goog/../webdriver/promise.js:564:12)
[internet explorer #3] at Array.forEach (native)
[internet explorer #3] at [object Object].promise.Promise.notifyAll_ (c:/REP
OSITORIOS/OficinaTA/site/node_modules/protractor/node_modules/selenium-webdriver
/lib/goog/../webdriver/promise.js:553:15)
[internet explorer #3] at goog.async.run.processWorkQueue (c:\REPOSITORIOS\O
ficinaTA\site\node_modules\protractor\node_modules\selenium-webdriver\lib\goog\a
sync\run.js:130:15)
[internet explorer #3] at process._tickCallback (node.js:366:9)
[internet explorer #3] From: Task: WebDriver.createSession()
[internet explorer #3] at Function.webdriver.WebDriver.acquireSession_ (c:\R
EPOSITORIOS\OficinaTA\site\node_modules\protractor\node_modules\selenium-webdriv
er\lib\webdriver\webdriver.js:157:22)
[internet explorer #3] at Function.webdriver.WebDriver.createSession (c:\REP
OSITORIOS\OficinaTA\site\node_modules\protractor\node_modules\selenium-webdriver
\lib\webdriver\webdriver.js:131:30)
[internet explorer #3] at [object Object].Builder.build (c:\REPOSITORIOS\Ofi
cinaTA\site\node_modules\protractor\node_modules\selenium-webdriver\builder.js:4
45:22)
[internet explorer #3] at [object Object].DriverProvider.getNewDriver (c:\RE
POSITORIOS\OficinaTA\site\node_modules\protractor\lib\driverProviders\driverProv
ider.js:38:7)
[internet explorer #3] at [object Object].Runner.createBrowser (c:\REPOSITOR
IOS\OficinaTA\site\node_modules\protractor\lib\runner.js:182:37)
[internet explorer #3] at c:\REPOSITORIOS\OficinaTA\site\node_modules\protra
ctor\lib\runner.js:263:21
[internet explorer #3] at _fulfilled (c:\REPOSITORIOS\OficinaTA\site\node_mo
dules\protractor\node_modules\q\q.js:797:54)
[internet explorer #3] at self.promiseDispatch.done (c:\REPOSITORIOS\Oficina
TA\site\node_modules\protractor\node_modules\q\q.js:826:30)
[internet explorer #3] at Promise.promise.promiseDispatch (c:\REPOSITORIOS\O
ficinaTA\site\node_modules\protractor\node_modules\q\q.js:759:13)
[internet explorer #3] at c:\REPOSITORIOS\OficinaTA\site\node_modules\protra
ctor\node_modules\q\q.js:573:44
[launcher] Runner process exited unexpectedly with error code: 1
[launcher] 2 instance(s) of WebDriver still running
.
------------------------------------
[chrome #1] PID: 14752
[chrome #1] Starting selenium standalone server...
[chrome #1] Selenium standalone server started at http://10.10.6.26:64609/wd/hub
[chrome #1] .
[chrome #1]
[chrome #1] Finished in 4.893 seconds
[chrome #1] 1 test, 0 assertions, 0 failures
[chrome #1]
[chrome #1] Shutting down selenium standalone server.
[launcher] 1 instance(s) of WebDriver still running
.
------------------------------------
[firefox #2] PID: 6572
[firefox #2] Starting selenium standalone server...
[firefox #2] Selenium standalone server started at http://10.10.6.26:61342/wd/hu
b
[firefox #2] .
[firefox #2]
[firefox #2] Finished in 1.03 seconds
[firefox #2] 1 test, 0 assertions, 0 failures
[firefox #2]
[firefox #2] Shutting down selenium standalone server.
[launcher] 0 instance(s) of WebDriver still running
[launcher] internet explorer #3 failed with exit code: 1
[launcher] chrome #1 passed
[launcher] firefox #2 passed
[launcher] overall: 1 process(es) failed to complete
[launcher] Process exited with error code 100
>>
Warning: Tests failed, protractor exited with code: 100 Use --force to continue.
Aborted due to warnings.
我不知道我是否忘记安装任何内容或更新任何内容。