Override Appium's ios_webkit_debug_proxy default port

Hey,

We’re trying to run tests on several iOS devices connected to the same mac, our app is hybrid and we use physical devices.
When automating hybrid app we need to have ios_webkit_debug_proxy running on port 27753 for the device we want to automate.

Since this port is default by Appium, we cannot have two webkits running - Appium will always address the device associated with port 27753.
So my question is this - It there a way to launch Appium with a custom webkit port?

I tried to do something similar a while back but hit a dead end. This issue suggests that Appium only uses the one port to talk to the device.

1 Like

Did you try:

  1. Open Terminal window
  2. execute appium/bin/ios-webkit-debug-proxy-launcher.js -c iOSdeviceidentity:debugportnumber -d
  3. Open another Terminal window
  4. export REMOTE_DEBUGGER_PORT=debugportnumber
  5. appium.js -a 127.0.0.1 -p 4723 --platform-name iOS --command-timeout 7200 --session-override --isolate-sim-device

This works for me and I can start 3 iOS device automation in parallel but there are issues with the instrument threading causing stability issues.

1 Like

I tried your above suggestion but it’s not working for me.

Please find below the error,which am getting
appium/bin/ios-webkit-debug-proxy-launcher.js -c iOSdeviceidentity:debugportnumber -d
RUNNING: ios_webkit_debug_proxy -c iOSdeviceidentity:debugportnumber -d
stderr: Unknown file: iOSdeviceidentity:debugportnumber

stderr: Unknown file: iOSdeviceidentity:debugportnumber
Unknown file: iOSdeviceidentity:debugportnumber

Kindly help me to fix the issue

export REMOTE_DEBUGGER_PORT=47723
appium.js -a 127.0.0.1 -p 4723 --platform-name iOS --command-timeout 7200 --session-override --isolate-sim-device.
How to launch above two commands programatically using java

There is a command provided by appium "–webkit-debug-proxy-port " , specifying this with the appium trigger will enable triggering appium server connecting to different iOS_webkit_debug_proxy ports.

Ex:

/Applications/Appium.app/Contents/Resources/node/bin/node /Applications/Appium.app/Contents/Resources/node_modules/appium/build/lib/main.js --address “127.0.0.1” --debug-log-spacing --device-name “iPhone 6S Plus” --webkit-debug-proxy-port 9227