lundi 5 novembre 2018

Protractor: Getting error message on config.js file which worked previously in terminal

running tests on protractor I keep getting a message that there is something wrong with my config file (which worked perfectly 2 days ago).

I would appreciate some help fixing this.

  1. What did I do wrong?
  2. How do I fix this?

Things to consider:

  • npm was updated globally 2 days ago (to version 11)

  • The package.json file was was set up correctly. Was able to run a
    test with no problems on saturday.

looking through the logs I think this is the issue:

npm ERR! LocatorTraining@ protractor: `protractor configurations.js` 

Looking through my configurations.js file, I've only added Html reporter to it. Nothing else.

var Jasmine2HtmlReporter = require('protractor-jasmine2-html-reporter');

exports.config = {
  seleniumAddress: 'http://localhost:4444/wd/hub',
  specs: ['PageObjectLocator2.js'],
  capabilities: {
    browserName: 'chrome'
  },

  onPrepare: function() {
      browser.driver.manage().window().maximize(); 

      jasmine.getEnv().addReporter(
                new Jasmine2HtmlReporter({
                  savePath: 'target/screenshots'
                })
              );




  }
}

Aucun commentaire:

Enregistrer un commentaire