← Back to list

Saucelabs Wonderproxy VPN connect Webdriverio WDIO

To run your application UI tests via Proxy service using wonderproxy and saucelabs in WDIO framework

Tejasvi Manmatha - Playwright, Cypress, Automation · 2025-02-18 16:31 · 0 claps · 0.7 min read
#wdio #webdriverio #playwright-test #typescript #javascript
Open on Medium ↗
Wiki topics: 🌐 · Web Development

Saucelabs Wonderproxy VPN connect Webdriverio WDIO

To run your application UI tests via Proxy service using wonderproxy and saucelabs in WDIO framework

  1. Establish sauce tunnel which create a connection via proxy service

a) Get sauce labs credentials

b) Get Wonderproxy credentials

*--proxythrough which country do we need traffic*

*--auth Proxy credentials*

c) Create a Sauce tunnel through which all the future connections will go

Install sauce connect https://docs.saucelabs.com/secure-connections/sauce-connect-5/installation/macos/

 sc run --username "$SAUCE_USERNAME" --access-key "$SAUCE_ACCESS_KEY" --region 'eu-central-1' --tunnel-name 'barcelona' --proxy "barcelona.wonderproxy.com:11000" --auth "$WONDERPROXY_USER:$WONDERPROXY_TOKEN@barcelona.wonderproxy.com:11000"
  1. Now pass all the WDIO traffic through above established tunnel

Add this into WDIO config

config.services = [
  ['sauce', {
      sauceConnect: true,
      sauceConnectOpts: {
        tunnelName: 'barcelona' 

      }
  }]]

Common Errors

  1. When wrong tunnel name is used in browser config *tunnelName*
@wdio/local-runner: Failed launching test session: TypeError: Cannot read properties of undefined (reading 'emit')
[0–1] at Runner._shutdown (node_modules/@wdio/runner/build/index.js:364:24)
[0–1] at Runner.run (file:///node_modules/@wdio/runner/build/index.js:50:25)
[0–1] 2025–02–18T16:29:16.336Z ERROR @wdio/local-runner: Failed launching test session: TypeError: Cannot read properties of undefined (reading 'sessionId')
[0–1] at Runner.endSession (@wdio/runner/build/index.js:403:50)

메타데이터
post_id
ce02da5957eb
slug
saucelabs-wonderproxy-vpn-connect-webdriverio-wdio-ce02da5957eb
url
https://medium.com/@tejasv2/saucelabs-wonderproxy-vpn-connect-webdriverio-wdio-ce02da5957eb
canonical_url
https://medium.com/@tejasv2/saucelabs-wonderproxy-vpn-connect-webdriverio-wdio-ce02da5957eb
author_url
https://medium.com/@tejasv2
status
ok
fetched_at
2026-07-20 22:48:06