I am new to the protractor and would like to take screenshots of my failed test cases in browsers.
Can you please help me out by advising how should I go about it?
Thank you :)
I am new to the protractor and would like to take screenshots of my failed test cases in browsers.
Can you please help me out by advising how should I go about it?
Thank you :)
You can use
protractor-jasmine2-screenshot-reporter
module for this, it has some good features which would serve your purpose.This will capture screenshots when your specs have failed, you have many more options, you can checkout this link : https://www.npmjs.com/package/protractor-jasmine2-screenshot-reporter
Please have a look on this chunk of code. In this code we are registering screenshot function properly with jasmine reporter. Its works for me.
I hope it helps! :)
Reference link