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
A simple option is to use:
browser.pause();
protractor/api/browser.pause
for example:
it('should .. test stuff', function() {
browser.pause(); //--->the automation will pause here - follow the instructions in your terminal to continue
//--->your broken testing magic here...
});
Place that method call as the first item in the spec body where you need to view the browsers console.
After the browser pauses you'll have control of the automation. You can then interact with the browser as usual, inspecting elements at different states, checking the browsers console, etc.
Continue the tests by entering c
for continue in your terminal - there will be a prompt with instructions waiting for your entry.