From 90c240212bc44978548d49576ced4926bfd83a1e Mon Sep 17 00:00:00 2001 From: Sudharsan Selvaraj Date: Sun, 23 Jun 2024 11:30:18 +0530 Subject: [PATCH] Fix ios manual control (#1206) --- src/CapabilityManager.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/CapabilityManager.ts b/src/CapabilityManager.ts index 8f02e7127..63754019e 100644 --- a/src/CapabilityManager.ts +++ b/src/CapabilityManager.ts @@ -95,11 +95,9 @@ export async function iOSCapabilities( caps.firstMatch[0]['appium:deviceName'] = freeDevice.name; caps.firstMatch[0]['appium:platformVersion'] = freeDevice.sdk; caps.firstMatch[0]['appium:wdaLocalPort'] = freeDevice.wdaLocalPort; - if (!isCapabilityAlreadyPresent(caps, 'appium:mjpegServerPort')) { - caps.firstMatch[0]['appium:mjpegServerPort'] = !!options.liveVideo - ? await getPort() - : undefined; - } + caps.firstMatch[0]['appium:mjpegServerPort'] = !!options.liveVideo + ? freeDevice.mjpegServerPort + : undefined; if (freeDevice.realDevice && !caps.firstMatch[0]['df:skipReport']) { const wdaInfo = await prisma.appInformation.findFirst({ where: { fileName: 'wda-resign.ipa' },