The conveyor cannot parse conf.js

I use protractor for e2e test for my angular application, but I get:

TypeError: Object # does not have a parsing method when calling protractor conf.js

Here is the contents of the conf file:

exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', capabilities: { 'browserName': 'chrome' }, specs: ['HomePageCtrl_spec.js'], chromeOnly: true, jasmineNodeOpts: { onComplete: null, isVerbose: false, showColors: true, includeStackTrace: true } }; 

And so, except that I run this command:

 E:\eCOIGit\sidhome\SidHome\SidHome.Tests\ng-test-e2e>protractor Conf.js 

Error:

C: \ Users \ xqwt \ AppData \ Roaming \ NPM \ node_modules \ protractor \ node_modules \ d \ q.js: 12 6 throw e; TypeError: object # does not have a 'parse' method in Function.ConfigParser.resolveFilePatterns (C: \ Users \ xqwt \ AppData \ Roaming \ npm \ node_modules \ protractor \ lib \ configParser.js: 102: 29) on the new Task Scheduler (C : \ Users \ xqwt \ AppData \ Roaming \ NPM \ node_modules \ protractor \ Lib \ taskScheduler.js: 31: 31) in C: \ Users \ xqwt \ AppData \ Roaming \ NPM \ node_modules \ protractor \ Lib \ launcher.js: 180:21 when _fulfilled (C: \ Users \ xqwt \ AppData \ Roaming \ NPM \ node_modules \ protractor \ nod e_modules \ q \ q.js: 797: 54) in self.promiseDispatch.done (C: \ Users \ xqwt \ AppData \ Roaming \ NPM \ node_modules \ protractor \ node_modules \ Q \ q.js: 826: 30) in Promise.promise.promiseDispatch (C: \ Users \ xqwt \ AppData \ Roaming \ NPM \ node_modules \ protractor \ node_modules \ Q \ q.js: 759: 13) in C: \ Users \ xqwt \ AppData \ Roaming \ NPM \ node_modules \ protractor \ node_modules \ Q \ q.js: 573: 44 with a flash (C: \ Users \ xqwt \ AppD ata \ Roaming \ NPM \ node_modules \ protractor \ node_mod ules \ q \ q.js: 108: 17) at process._tickCallback (node.js: 419: 13) at Function.Module.runMain (module.js: 499: 11 )

+5
source share
1 answer

It was a bug in the protractor, the problem is now fixed.

Currently, you can get the version containing the fix by installing it directly from the main branch:

 npm install git+https://github.com/angular/protractor.git 

As a workaround, instead, you can update the node to> = 0.12.


Here are the related issues from protractor problem tracking:


See also:

+3
source

Source: https://habr.com/ru/post/1233205/


All Articles