-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
7
Node.js Version
16
Mode
WDIO Testrunner
Which capabilities are you using?
{
userA: {
capabilities: {
browserName: 'chrome',
acceptInsecureCerts: true,
'goog:loggingPrefs': { browser: 'ALL' },
'goog:chromeOptions': {
args: ['--disable-gpu', '--window-size=1440,800', '--enable-logging-info']
}
},
baseUrl: process.env.CRM_FRONTEND_E2E_BASEURL
},
userB: {
capabilities: {
browserName: 'chrome',
acceptInsecureCerts: true,
'goog:chromeOptions': {
args: ['--disable-gpu', '--window-size=1440,800']
}
},
baseUrl: process.env.WEBSHOP_FRONTEND_E2E_BASEURL
}
},What happened?
Running test with multi-remote causes the code in launcher to break on forEach, as capabilities is in this case an object with userA, userB (see above config).
capabilities.forEach((capability) => {
capability['wdio:sharedStoreServicePort'] = port
})I did experiment a bit and got the code working for set and get, but it always returns 'value,value' to me. Which I think is caused by the two browser objects.
What is your expected behavior?
Either the capabilities in the onPrepare hook should really be the capabilities (not the two browsers). or there should be some code to handle the two browser objects in get down into their capabilities.
At the end of the day, I want the shared-store-service to work with multiple browsers, because that's what it is there for, right?
How to reproduce the bug.
I will try to set something up, if you are not able to reproduce this yourselfes.
Relevant log output
TypeError: capabilities.forEach is not a function
at SharedStoreLauncher.onPrepare (...\e2e-tests\node_modules\@wdio\shared-store-service\build\launcher.js:16:22)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async ...\e2e-tests\node_modules\@wdio\cli\build\utils.js:38:17
at async Promise.all (index 1)
at async Launcher.run (...\e2e-tests\node_modules\@wdio\cli\build\launcher.js:86:13)Code of Conduct
- I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues