diff --git a/src/CapabilityManager.ts b/src/CapabilityManager.ts index ec5be5049..f8cb6d343 100644 --- a/src/CapabilityManager.ts +++ b/src/CapabilityManager.ts @@ -93,6 +93,7 @@ export async function iOSCapabilities( caps.firstMatch[0]['appium:udid'] = freeDevice.udid; caps.firstMatch[0]['appium:deviceName'] = freeDevice.name; caps.firstMatch[0]['appium:platformVersion'] = freeDevice.sdk; + caps.firstMatch[0]['appium:wdaLocalPort'] = freeDevice.wdaLocalPort; caps.firstMatch[0]['appium:mjpegServerPort'] = options.liveVideo ? freeDevice.mjpegServerPort : undefined; @@ -101,11 +102,11 @@ export async function iOSCapabilities( where: { fileName: 'wda-resign.ipa' }, }); if (wdaInfo && !process.env.GO_IOS) { - caps.firstMatch[0]['appium:wdaLocalPort'] = freeDevice.wdaLocalPort; caps.firstMatch[0]['appium:usePreinstalledWDA'] = true; caps.firstMatch[0]['appium:updatedWDABundleId'] = wdaInfo.appBundleId; caps.firstMatch[0]['appium:updatedWDABundleIdSuffix'] = ''; } else if (wdaInfo && process.env.GO_IOS) { + delete caps.firstMatch[0]['appium:wdaLocalPort']; caps.firstMatch[0]['appium:webDriverAgentUrl'] = freeDevice.webDriverAgentUrl; } }