Skip to content

Run selenoid test with webdriver desired capabilities KO #2183

Closed

Description

@guillaumeray

What are you trying to achieve?

Run selenoid test with desired capabilities

What do you get instead?

CodeceptJS v2.4.3
Using test root "/Users/user/Workspace/codeceptjs"

devis --
    Gestion des devis
  Création devis en tant qu'admin @devis @automated
  ✖ "before each" hook: codeceptjs.before for "Création devis en tant qu'admin @devis @automated" in 1ms
TypeError: Cannot set property 'name' of undefined

-- FAILURES:

  1) devis
       "before each" hook: codeceptjs.before for "Création devis en tant qu'admin @devis @automated":
     Cannot set property 'name' of undefined

Provide test source code if related
codecept.conf.js

require('dotenv').config();
/// <reference path="../steps.d.ts" />

exports.config = {

  tests: 'tests/b2c/*_test.js',
  output: 'output',     
  helpers: {

    WebDriver: {
      url: process.env.WEBSITE_URL,
      browser: 'chrome',
      smartWait: 20000,
      windowSize: '1920x1080', 
      host: '127.0.0.1',
      port: 4444,
      desiredCapabilities:{
        acceptInsecureCerts: true,
      }
  }
  
  },

  gherkin: {
    features: './features/b2c/*.feature',
    steps: [
      './features/general/steps/general_steps.js'
    ]
  },

  include: {
    I: './steps_file.js',
    // b2c
    basketPage: './pages/b2c/basket.js'
  },  

  bootstrap: null,
  name: 'tests codeceptjs',

  plugins: {
 
    selenoid: {
      enabled: true,
      deletePassed: true,
      autoCreate: false,
      autoStart: false,
      sessionTimeout: '30m',
      enableVideo: true,
      enableLog: true,
      enableVnc: true
    },

    autoDelay: {
      enabled: true,
      delayAfter: 1000,
    },
  },

  mocha: {
    reporterOptions: {
      "codeceptjs-cli-reporter": {
        stdout: "-",
        options: {
          steps: true,
        }
      },
      "mocha-junit-reporter": {
        stdout: "./output/console.log",
        options: {
          mochaFile: "./output/result.xml"
        },
        attachments: true 
      }
    }
  },
}

Details

  • CodeceptJS version:
    CodeceptJS v2.4.3
  • NodeJS Version:
    v13.6.0
  • Operating System:
    macOS hight sierra 10.13.6
  • webdriverio 5.18.0
  • Configuration file:
    SEE ABOVE

Idea about the problem :
The bug concern the new codeceptjs plugin : node_modules/codeceptjs/lib/plugin/selenoid.js.
When i use desired capabilities as webdriver conf the function setOptionsForWebdriver doesnt work (selenoid:options is not injected in webdriver option).

Thanks for your help

Activity

  1. KMKoushik commented on Feb 6, 2020

    @KMKoushik
    Collaborator

    @guillaumeray Can you share the console result by running --verbose.

  2. KMKoushik commented on Feb 6, 2020

    @KMKoushik
    Collaborator

    @guillaumeray Found the issue. It's not working if desiredCapabilities is added in the helper. will fix it soon. Thanks for raising the issue. :)

  3. self-assigned this
    on Feb 6, 2020
  4. guillaumeray commented on Feb 10, 2020

    @guillaumeray
    Author

    thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions