webdriverio-community / wdio-edgedriver-service

WebdriverIO service to start & stop EdgeDriver
https://webdriver.io
MIT License
2 stars 3 forks source link

How to send custom edgedriver path and port while using edgeDriver Services #175

Closed nam81285 closed 1 year ago

nam81285 commented 1 year ago

I want to pass the path of my edgedriver in my config file. Not sure how to do that?

Below is my wdio.conf.js file:-

export const config = { // // ==================== // Runner Configuration // ==================== // WebdriverIO supports running e2e tests as well as unit and component tests. runner: 'local', // specs: [ './features/featureFiles/*.feature' ], // Patterns to exclude. exclude: [ // 'path/to/excluded/files' ], // // ============ // Capabilities // ============

maxInstances: 10,

capabilities: [{

    maxInstances: 5,
    //
    browserName: 'msedge',
    'goog:chromeOptions': {

         args: ['disable-gpu','start-maximized', 'no-sandbox'],
    },
    'ms:edgeOptions':{
        args: ['--disable-gpu','--start-maximized', '--no-sandbox'],
    },
    acceptInsecureCerts: true,

}],
//
// ===================
// Test Configurations
// ===================

// Level of logging verbosity: trace | debug | info | warn | error | silent
logLevel: 'info',

bail: 0,

baseUrl: 'http://localhost',
//
// Default timeout for all waitFor* commands.
waitforTimeout: 10000,
connectionRetryTimeout: 120000,
connectionRetryCount: 3,
services: ['edgedriver'],
framework: 'cucumber',
reporters: ['spec'],

// If you are using Cucumber you need to specify the location of your step definitions.
cucumberOpts: {
    // <string[]> (file/dir) require files before executing features
    require: ['./features/step-definitions/*.js'], // <boolean> show full backtrace for errors
    backtrace: false, // <string[]> ("extension:module") require files with the given EXTENSION after requiring MODULE (repeatable)
    requireModule: [], // <boolean> invoke formatters without executing steps
    dryRun: false, // <boolean> abort the run on first failure
    failFast: false, // <boolean> hide step definition snippets for pending steps
    snippets: true, // <boolean> hide source uris
    source: true, // <boolean> fail if there are any undefined or pending steps
    strict: false, // <string> (expression) only execute the features or scenarios with tags matching the expression
    tagExpression: '', // <number> timeout for step definitions
    timeout: 60000, // <boolean> Enable this config to treat undefined definitions as warnings.
    ignoreUndefinedDefinitions: false
},

}

When I am executing this I am getting a edgeDriver path issue-

Start Edgedriver (C:\Demo\New_RA_WDIO_Framework\node_modules\msedgedriver\lib\msedgedriver\msedgedriver.exe) with args --port=1076

I want to modify this path in bold to a custom binary path.

Please help

christian-bromann commented 1 year ago

See the edgedriverCustomPath option.