How can I view console.log output in an angularjs protractor jasmine test? As of now, the browser closes by itself too quickly.
more info - I am working with the ang
In order to keep the browser's window open you should try running Protractor in debug mode:
$ debug
Then in your spec file add this line where you want the execution to stop:
browser.debugger();
In the Protractor debugger console, you can step over the stops by typing c or cont.
More info here: https://github.com/angular/protractor/blob/master/docs/debugging.md
Now, in order to get the console content you can check how to do it in Protractor FAQ: https://github.com/angular/protractor/blob/master/docs/faq.md#how-can-i-get-hold-of-the-browsers-console
Something like:
browser.manage().logs().get('browser').then(function(browserLog) {
console.log('log: ' + require('util').inspect(browserLog));
})