Protractor stacktrace does not mention the line number on the .js file where the syntax issue or error occurs -


this conf.js

exports.config = { seleniumaddress: 'http://localhost:4444/wd/hub', specs: ['c:\\users\\meiyer\\desktop\\protractor_tests\\specs\\specs.js'], baseurl: 'https://devcp.us.sunpowermonitor.com/#/dashboard', // framework use. jasmine recommended. framework: 'jasmine', //options passed jasmine-node. jasminenodeopts: {   oncomplete: null,   isverbose: true,   showcolors: true,   includestacktrace: true  }  }; 

this specs.js

var elhloginpage = { nameinput : element(by.model('user.username')), passinput : element(by.model('model')), submitbutton :element(by.buttontext('sign in')), setemail: function(email) { this.nameinput.sendkeys(email); }, setpass: function(password) { this.passinput.sendkeys(password); }, clicksubmit:function(){ this.submitbutton.click(); } };  var elhhomepage = { greetingtext : element(by.css('.greeting-des')), getgreetingtext: function() { this.greetingtext.text(); } };   describe('elhloginpage login test', function() { it('should land on homepage when valid username , password entered',   function(){ elhloginpage.setemail('lease_id@test.com'); elhloginpage.setpass('sun'); elhloginpage.clicksubmit(); expect(elhhomepage.getgreetingtext().toequal('hello lease'); }); }); 

i executing test on node.js command prompt -> protractor conf.js. getting below stack trace. information below -i not able debug on line number on either of .js files issue has occurred. there way activate information on stacktrace?

stacktrace -

  c:\users\meiyer\desktop\protractor_tests>protractor conf.js   [15:40:56] i/hosted - using selenium server @    http://localhost:4444/wd/hub   [15:40:56] i/launcher - running 1 instances of webdriver   [15:40:58] e/launcher - error: syntaxerror: missing ) after argument list     @ exports.runinthiscontext (vm.js:53:16)     @ module._compile (module.js:373:25)     @ object.module._extensions..js (module.js:416:10)     @ module.load (module.js:343:32)     @ function.module._load (module.js:300:12)     @ module.require (module.js:353:17)     @ require (internal/module.js:12:17)     @      c:\users\meiyer\appdata\roaming\npm\node_modules\protractor\node_modules\    jasmine\lib\jasmine.js:71:5    @ array.foreach (native)    @ jasmine.loadspecs       c:\users\meiyer\appdata\roaming\npm\node_modules\protr     actor\node_modules\jasmine\lib\jasmine.js:70:18)    [15:40:58] e/launcher - process exited error code 100 

unforunately can common error in protractor syntax issues. it's hard tell without code indentation, error missing ) , @ quick glance looks missing 1 in final expect statement.

you have:

expect(elhhomepage.getgreetingtext().toequal('hello lease'); 

it should be:

expect(elhhomepage.getgreetingtext()).toequal('hello lease'); 

you can use linters es lint find syntax errors this.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -