It can be useful to capture screenshots of your end-to-end functional tests with protractor. Because protractor tests are "just node", it is very straight forward.
oh my gosh this just blew my mind. Thank you
+1 to your theme too
This code does not work for the current protractor and jasmine. Could you provide a solution? I can't seem to get the currentSpec object to capture.
Like Evan said, this code does not work with jasmine versions 2.0 and above (so newer versions of protractor) because they don't let you access currentSpec anymore. There are some libraries for creating screenshot reports, but the process has gotten a lot less simple.
can you please add an video as how to generate an HTML reports in Protractor Automation.
Can you please add an video to read data from Excel in protractor automation
What does fs import do and how would it stop the tests from running correctly?
var spec = jasmine.getEnv().currentSpec is always returning a null value.