Can someone, please, assist, in following:
Created separate conf files for Chrome & Firefox on webdriver.io (latest version 7.19.3), but could not acchive to create (also separate) config file for Microsoft Edge driver, on Widows 10 machine. At the main conf file (wdio.conf.js) are just regular settings without any browser settings, and would like to leave it that way.
What I did:
exports.config = merge(wdioConf.config, {
capabilities: [
{
maxInstances: 1,
browserName: 'MicrosoftEdge',
osPlatform: 'Windows',
osVersion: '10',
acceptInsecureCerts: true,
},
],
baseUrl: 'https://some.site.for.testing,
waitforTimeout: 10000,
connectionRetryCount: 3,
services: ['selenium-standalone'],
seleniumArgs: {
javaArgs: [
'-Dwebdriver.edge.driver=path.join(__dirname, "./node_modules/selenium-standalone/.selenium/edgedriver/17134/MicrosoftEdgeDriver.exe")'
]
}
});
Or other config, which also tried:
exports.config = merge(wdioConf.config, {
capabilities: [
{
maxInstances: 1,
browserName: 'msedge',
acceptInsecureCerts: true,
},
],
baseUrl: 'https://some.site.for.testing',
waitforTimeout: 10000,
connectionRetryCount: 3,
services: [['selenium-standalone', { drivers: { msedge: 'latest' } }]],
});
But, without any success. When run
npx wdio run config/wdio.edge.conf.js
Either get that "missing configuration" or runner get stuck
When run tests either with FF or Chrome, it runs smoothly.
npx wdio run config/wdio.chrome.conf.js
Thank you in advance.
CodePudding user response:
If can be useful to anyone, only solution which acchieved, is:
Create copy of wdio.main.conf and inside browser capabillities add edge setup (used solution provided in :https://dev.to/tswiftma/webdriverio-edge-driver-options-5038).
Finally, rename main.conf into, i.e wdio.msedge.conf.
NOTE: If just add Edge config into main.conf (and not create a copy of main.conf), tests will only run in Edge. In FF & Chrome will not,
Main cofig file wdio.main.conf remains as it were before changes