This repository has been archived by the owner on Jan 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
don't work with protractor 2.0.0 #25
Labels
Comments
please provide further information (logs, error messages). |
onPrepare: ->
jasmine.getEnv().addReporter new ScreenShotReporter
baseDirectory: path.resolve __dirname, 'results-e2e/screenshots'
pathBuilder: ( spec, desc, results, capabilities ) ->
path.join capabilities.caps_.browser, desc.join '-' No images are stored in the baseDirectory and nothing in the protractor output relates to screenshots |
Yes, I've got the same problem. |
@swissmanu is that enough? I wonder if its because of jasmine 2 though |
Same here with protractor 2.2.0 |
I don't know if it's helpful, but I've written my own reporter that works with the current version of protractor (3.0). It's very simple, but it could be used as a basis to update this project. var fs = require('fs');
function writeScreenShot(data, filename) {
var stream = fs.createWriteStream(filename);
stream.write(new Buffer(data, 'base64'));
stream.end();
}
function ScreenshotReporter(config) {
this.config = config;
};
/*
* Create tmp/screenshots if it doesn't exist
*/
ScreenshotReporter.prototype.jasmineStarted = function(suiteInfo) {
if(!fs.existsSync('tmp/screenshots')) { fs.mkdirSync('tmp/screenshots'); }
};
/*
* Take a screenshot and write it to the a
* parameterized file name based on the spec.
*/
ScreenshotReporter.prototype.specDone = function(result) {
name = result.fullName.replace(/\W+/g, "-").replace(/^\W+/, '');
browser.takeScreenshot().then(function (png) {
writeScreenShot(png, 'tmp/screenshots/' + name + '.png');
});
};
module.exports = ScreenshotReporter; |
I'm having the same issue and @SteveAquino's reporter seems to work fine. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
No description provided.
The text was updated successfully, but these errors were encountered: