1.0.0 • Published 7 years ago
jasmine-protractor-browser-log-reporter v1.0.0
Jasmine Protractor Browser Log Reporter
This is a custom reporter for Jasmine that will automatically flush the Protractor browser console logs in between tests and output those logs to the terminal if the test failed.
Installation
npm install --save-dev jasmine-protractor-browser-log-reporter
Use
In your Protractor config file, set Selenium's logging preference to ALL
and add this project as a custom Jasmine reporter:
const { ProtractorBrowserLogReporter } = require('jasmine-protractor-browser-log-reporter');
exports.config = {
capabilities: {
'browserName': 'chrome'
},
loggingPrefs: {
'browser': 'ALL'
},
directConnect: true,
baseUrl: 'http://localhost:8080/',
framework: 'jasmine',
onPrepare() {
jasmine.getEnv().addReporter(new ProtractorBrowserLogReporter());
}
};
Acknowledgments
The idea for this reporter was taken from this blog post that describes outputting Protracor browser logs to file using Jasmine 1.3
1.0.0
7 years ago