CodeceptJS icon indicating copy to clipboard operation
CodeceptJS copied to clipboard

"before each" hook issue

Open lynnh99 opened this issue 3 years ago • 0 comments

What are you trying to achieve?

i tried to run simple test using protractor helper with version 3.0.0 of codeceptjs, but i faced an error

What do you get instead?

error

Provide console output if related. Use --verbose mode for more details. image

Feature('My First Test');

Scenario('test something', ({ I }) => {
  I.amOnPage('https://www.google.com');
  
});

Details

  • CodeceptJS version: "codeceptjs": "^3.0.0"
  • "protractor": "^3.0.0", "mocha": "8.1.3"
  • NodeJS Version:16.14.0
  • Operating System:widos 10
const { setHeadlessWhen } = require('@codeceptjs/configure');

// turn on headless mode when running with HEADLESS=true environment variable
// export HEADLESS=true && npx codeceptjs run
setHeadlessWhen(process.env.HEADLESS);

exports.config = {
  tests: './*_test.js',
  output: './output',
  helpers: {
    Protractor: {
      url: 'http://localhost',
      driver: 'hosted',
      browser: 'chrome',
      rootElement: 'body',
      angular: false
    }
  },
  include: {
    I: './steps_file.js'
  },
  bootstrap: null,
  mocha: {},
  name: 'Task1',
  plugins: {
    pauseOnFail: {},
    retryFailedStep: {
      enabled: true
    },
    tryTo: {
      enabled: true
    },
    screenshotOnFail: {
      enabled: true
    }
  }
}

Note: i dont want 3.1.0 version of codeceptjs, because i want to use protractor in older version of codeceptjs

lynnh99 avatar Mar 08 '22 16:03 lynnh99