mlison / protractor-jasmine2-screenshot-reporter

Protractor screenshot reporter for Jasmine2
https://www.npmjs.com/package/protractor-jasmine2-screenshot-reporter
MIT License
81 stars 79 forks source link

Error: Cannot find module 'protractor-html-screenshot-reporter' #118

Open anuradhaprasad04 opened 7 years ago

anuradhaprasad04 commented 7 years ago

Hi Team, I have installed protractor-html-screenshot-reporter using below command, but still getting error while running conf.js.

C:\Program Files\nodejs\node_modules\npm>npm install protractor-html-screenshot-reporter --save-dev

Conf File content: var HtmlReporter = require('protractor-html-screenshot-reporter'); var reporter = new HtmlReporter({ baseDirectory: 'E:/astro/protractor-result', // a location to store screen shots.
docTitle: 'Protractor Demo Reporter', docName: 'protractor-demo-tests-report.html' });

// conf.js exports.config = { framework: 'jasmine', capabilities: { browserName: 'chrome', }, specs: ['CreateAssignmentFail.js'], onPrepare: function() { // Add a screenshot reporter and store screenshots to /tmp/screnshots: jasmine.getEnv().addReporter(new HtmlReporter({ baseDirectory: '/tmp/screenshots' })); } };

Also tried installing the reporter globally but even that didn't fix the problem. Thanks, Anuradha

SagarBobade commented 5 years ago

@anuradhaprasad04 You have to run command in your project folder. i think command is not working for globally.

chilakamarthi commented 4 years ago

@anuradhaprasad04 You have to run command in your project folder. i think command is not working for globally.

It works. Thank you.