E:\Work\Test>grunt test-e2e
Running "protractor_webdriver:start" (protractor_webdriver) task
Starting Selenium server
Started Selenium server: http://127.0.0.1:4444
Running "protractor:start" (protractor) task
webdriver-manager path: E:\Work\Test\node_modules\protractor\bin\webdriver-manager
[11:36:31] I/update - chromedriver: file exists E:\Work\Test\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.26win32.zip
[11:36:31] I/update - chromedriver: unzipping chromedriver_2.26win32.zip
E:\Work\Test\node_modules\q\q.js:155
throw e;
^
Error: EPERM: operation not permitted, rename 'E:\Work\Test\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver.exe' -> 'E:\Work\Test\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.26.exe'
at Error (native)
at Object.fs.renameSync (fs.js:810:18)
at unzip (E:\Work\Test\node_modules\protractor\node_modules\webdriver-manager\built\lib\cmds\update.js:210:8)
at E:\Work\Test\node_modules\protractor\node_modules\webdriver-manager\built\lib\cmds\update.js:180:13
at _fulfilled (E:\Work\Test\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (E:\Work\Test\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (E:\Work\Test\node_modules\q\q.js:796:13)
at E:\Work\Test\node_modules\q\q.js:604:44
at runSingle (E:\Work\Test\node_modules\q\q.js:137:13)
at flush (E:\Work\Test\node_modules\q\q.js:125:13)
[11:36:41] I/direct - Using ChromeDriver directly...
[11:36:41] I/launcher - Running 1 instances of WebDriver
Jasmine started
[656:2544:0930/113649.269:ERROR:shader_disk_cache.cc(237)] Failed to create shader cache entry: -2
[656:2544:0930/113707.323:ERROR:shader_disk_cache.cc(237)] Failed to create shader cache entry: -2
[656:2544:0930/113707.431:ERROR:service_manager.cc(156)] Connection InterfaceProviderSpec prevented service: content_plugin from binding interface: memory_instrumentation::mojom::Coordinator exposed by: content_browser
0. Test App Login Module
√ module 0.1 should Login
33. Existing a contact tile.
√ Existing a contact
Executed 2 of 2 specs SUCCESS in 1 min 22 secs.
[12:06:18] I/launcher - 0 instance(s) of WebDriver still running
[12:06:18] I/launcher - chrome #01 passed
E:\Work\Test>
我正在使用带有量角器测试工具的grunt任务运行器。我有两个问题。
(Error before Jasmine started.)
,但之后所有测试套件都按预期运行良好。那么这个错误意味着什么?directConnect:true
。为什么它在控制台中显示如 - 启动Selenium服务器
启动Selenium服务器:http://127.0.0.1:4444
来自绑定接口的Jasmine started [656:2544:0930/113649.269:ERROR:shader_disk_cache.cc(237)] Failed to create shader cache entry: -2 [656:2544:0930/113707.323:ERROR:shader_disk_cache.cc(237)] Failed to create shader cache entry: -2 [656:2544:0930/113707.431:ERROR:service_manager.cc(156)] Connection InterfaceProviderSpec prevented service: content_plugin
:memory_instrumentation :: mojom :: Coordinator 暴露者:content_browser
更新
这是我的Package.json文件
{
"name": "E2E-Test",
"version": "0.0.1",
"author": "Vikash.777",
"description": "Grunt File Configuration",
"dependencies": {
"fs-extra": "^4.0.1",
"grunt": "~0.4.4",
"grunt-protractor-runner": "^4.0.0",
"grunt-protractor-webdriver": "^0.2.5",
"grunt-simple-mocha": "^0.4.1",
"jasmine-core": "^2.5.2",
"jasmine-reporters": "^2.2.1",
"jasmine-spec-reporter": "^4.1.0",
"jasmine2-protractor-utils": "^1.3.0",
"karma": "^1.3.0",
"karma-jasmine": "^1.1.0",
"karma-phantomjs-launcher": "^1.0.2",
"protractor-html-reporter": "^1.3.2"
},
"devDependencies": {
"grunt-open": "^0.2.3"
}
}
答案 0 :(得分:0)
以下是您遇到的问题。您有一个test-e2e
任务启动了protractor:start
webdriver-manager update
和webdriver-manager start
现在这将下载chromedriver。并尝试移动到命名版本。
E:\Work\Test\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver.exe' -> 'E:\Work\Test\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.26.exe
另一个进程已经在运行,这使得此举无法进行。所以你需要杀死所有现有的chromedriver.exe
。启动任务也可能是启动硒网格,这在您的情况下是不需要的。你应该做的只是让量角器控制发射。删除任何自行执行webdriver管理器的任务