protractor-jasmine2-screenshot-reporter icon indicating copy to clipboard operation
protractor-jasmine2-screenshot-reporter copied to clipboard

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

Open anuradhaprasad04 opened this issue 7 years ago • 2 comments

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

anuradhaprasad04 avatar Nov 14 '17 11:11 anuradhaprasad04

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

SagarBobade avatar Sep 14 '19 20:09 SagarBobade

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

It works. Thank you.

chilakamarthi avatar Apr 15 '20 06:04 chilakamarthi