I need to run tests in 2 different browsers simultaneously - 1 Web + 1 Mobile Web. I am trying to set up wdio to work with Multiremote settings but no luck. I am getting logs with retries:
...
[0-0] 2021-12-30T13:36:26.056Z INFO webdriver: [POST] https://ondemand.eu-central-1.saucelabs.com:4723/wd/hub/session
[0-0] 2021-12-30T13:36:26.056Z INFO webdriver: DATA {
[0-0] capabilities: {
[0-0] alwaysMatch: {
...
Then it fails with error:
0-0] 2021-12-30T13:37:41.062Z ERROR webdriver: Request failed with status undefined due to RequestError: connect ETIMEDOUT my-ip:4723 when running "https://ondemand.eu-central-1.saucelabs.com:4723/wd/hub/session" with method "POST" and args "{"capabilities":{"alwaysMatch":{"browserName":"chrome","browserVersion":"latest","platformName":"macOS 11","sauce:options":{"extendedDebugging":true}},"firstMatch":[{}]},"desiredCapabilities":{"browserName":"chrome","browserVersion":"latest","platformName":"macOS 11","sauce:options":{"extendedDebugging":true}}}"
[0-0] 2021-12-30T13:37:41.062Z ERROR webdriver: RequestError: connect ETIMEDOUT my-ip:4723 when running "https://ondemand.eu-central-1.saucelabs.com:4723/wd/hub/session" with method "POST" and args "{"capabilities":{"alwaysMatch":{"browserName":"chrome","browserVersion":"latest","platformName":"macOS 11","sauce:options":{"extendedDebugging":true}},"firstMatch":[{}]},"desiredCapabilities":{"browserName":"chrome","browserVersion":"latest","platformName":"macOS 11","sauce:options":{"extendedDebugging":true}}}"
[0-0] at getTimeoutError (/Users/admin/Documents/Work/new-runner/node_modules/webdriver/build/utils.js:295:24)
...
My test consists only from me opening an url with browser.url('url')
command in describe and test blocks.
Whole project is created from zero using yarn create wdio .
command.
My config file is:
export const config: WebdriverIO.Config = {
port: 4723,
user: "my_user_name",
key: "my_key",
region: 'eu',
specs: [
'./tests/**/*.ts'
],
exclude: [
],
maxInstances: 6,
capabilities: {
webBrowser: {
capabilities: {
browserName: 'chrome',
browserVersion: 'latest',
platformName: 'macOS 12',
'sauce:options': {}
}
},
appBrowser: {
capabilities: {
browserName: 'Safari',
'appium:deviceName': 'iPhone 13',
platformName: 'iOS',
'appium:platformVersion': '15.0',
'sauce:options': {},
}
}
},
logLevel: 'info',
bail: 0,
baseUrl: 'http://localhost',
waitforTimeout: 10000,
connectionRetryTimeout: 120000,
connectionRetryCount: 3,
services: ['sauce', 'appium', 'selenium-standalone'],
framework: 'mocha',
reporters: ['spec'],
mochaOpts: {
ui: 'bdd',
timeout: 60000
},
}
I also cannot access my browsers in the test file like it is shown in their guide, e.g. browser["webBrowser"].url('...')
.
Please help, thank you very much!
Obviously, I found the answer right away after I asked this question :/
The answer is: remove port option, remove appium and selenium-standalone from services.