Skip to content

Protractor: Bad error behavior when Selenium server is not available (since CodeceptJS 3) #2634

@ngraf

Description

@ngraf

What are you trying to achieve?

Run e2e test with "Protractor" against non-existing Selenium server.
I expect a meaningful error message like in CodeceptJS2 that gives me a hint from Protractor that Selenium server is not available.

What do you get instead?

"before each" hook: codeceptjs.before for "my scenario name" in 42ms

... and that's it! :/

Provide test source code if related

Feature('my feature name');

Scenario('my scenario name',  async({I}) => {
  I.amOnPage('https://www.example.com')
});

Details

  • CodeceptJS version: 3.0.1
  • NodeJS Version: 12.16
  • Operating System: MacOS
  • protractor version: 5.4.4
  • Configuration file:
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: 'https://www.google.com',
      driver: 'hosted',
      seleniumAddress: 'http://does.not.exist:4444/wd/hub',
      browser: 'chrome',
      rootElement: 'body',
      angular: false
    },
  },
  include: {
    I: './steps_file.js'
  },
  bootstrap: null,
  mocha: {},
  name: 'codeceptjs-vanilla',
  plugins: {
    pauseOnFail: {},
    retryFailedStep: {
      enabled: true
    },
    tryTo: {
      enabled: true
    },
    screenshotOnFail: {
      enabled: true
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions