I'm trying to automate test cases for a websocket based chat app and the Multiremote function of Codeceptjs with the WebdriverIO helper, called my attention. However, I'm struggling to make it work.
I would like to set my codecept.js config file and test files correctly to switch and act back and forth between one browser and the other one.
{
"output": "./output",
"helpers": {
"WebDriverIO": {
"url": "localhost",
"browser":"chrome",
"multiremote": {
"MyChrome1": {
"desiredCapabilities": {
"browserName": "chrome"
}
},
"MyChrome2": {
"desiredCapabilities": {
"browserName": "chrome"
}
}
},
"restart": false,
"windowSize": "maximize",
"timeouts": {
"script": 60000,
"page load": 10000,
"implicit": 5000
}
}
},
"include": {
"I": "./steps/ICustom_steps.js",
"loginPage": "./page_objects/login_page/login_page.js",
"chatPage": "./page_objects/chat_page/chat_page.js"
},
"mocha": {},
"bootstrap": false,
"teardown": null,
"hooks": [],
"tests": "./test_cases/*_test.js",
"timeout": 10000,
"name": "chat app test"
}
I can see the 2 browsers popping up but how can I set the test files correctly to switch interact back and forth between one browser and the other one.