LambdaTest / wdio-lambdatest-service

WebdriverIO LambdaTest Service
Other
6 stars 13 forks source link

tunnelName is not passed to the capability #12

Closed timzatko closed 2 years ago

timzatko commented 3 years ago

Hi! When using @wdio v7 I must format capabilities like this.

{
  alwaysMatch: {
    platform: 'Windows 10',
    version: '88.0',
    browserName: 'Chrome',
    'goog:chromeOptions': { prefs: [Object] },
    project: 'webxp-js-client',
    build: 'v2.11.0-48-g85430382 Thu May 20 2021 12:26:32 GMT+0200 (Central European Summer Time)',
    console: true,
    network: true,
    tunnel: true,
  },
}

However, when I try to use tunnelName in lambdatest-service options (code below)...

...
 services: [
        [
            'lambdatest',
            {
                tunnel: true,
                lambdatestOpts: {
                    tunnelName: Date.now().toString(),
                },
            },
        ],
        'intercept',
    ],
...

... it does not set the tunnelName option on capabilities correctly and the capability will look like this:

{
  alwaysMatch: {
    platform: 'Windows 10',
    version: '88.0',
    browserName: 'Chrome',
    'goog:chromeOptions': { prefs: [Object] },
    project: 'webxp-js-client',
    build: 'v2.11.0-48-g85430382 Thu May 20 2021 12:26:32 GMT+0200 (Central European Summer Time)',
    console: true,
    network: true,
    tunnel: true,
  },
   tunnel: true,
  tunnelName: 123123,
}

This will result in the following error (when using multiple tunnels).

[0-0] 2021-05-20T10:22:27.564Z ERROR webdriver: Request failed with status 404 due to Error: There're 2 active tunnels, please provide an tunnel identifier

Shivanshu-lambdatest commented 2 years ago

HI @timzatko Thanks for opening the issue, this seems to be working fine. If you are still facing this issue please share a little more details like the operating system of the machine on which you are trying to use tunnel etc.

dubesar commented 2 years ago

Closing this ticket due to inactivity, please feel free to open in case of any problem.