2

In Protractor, I need to run one line of code from the test suite called mytest:

console.log('my first Protractor test');

I am not loading any webpages. I am only printing to the console.

I have the following latest stable versions:

  • node -v => v8.11.2
  • npm -v => 6.0.1
  • protractor --version => 5.3.2

C:\test\> protractor conf.js --suite=mytest

I am getting the following error:

[15:59:08] E/configParser - Error code: 105
[15:59:08] E/configParser - Error message: failed loading configuration file conf.js
[15:59:08] E/configParser - C:\test\conf.js:59
    getPageTimeout: 100000, //Timed out waiting for page to load, and alternatively browser.get(address, timeout_in_millis)
                  ^
SyntaxError: Unexpected token :
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at ConfigParser.addFileConfig (C:\Users\myusername\AppData\Roaming\npm\node_modules\protractor\built\configParser.js:135:26)
  • Pls share your conf.js file where this error is coming. – Vishal Aggarwal Jul 12 '18 at 11:38
1

It seems to be syntax issue before the highlighted error line(getPageTimeout) in the conf file.

In general ,Run suite as below(without '='):

protractor conf.js --suite mytest

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.