From ea274dc7508de9b3c7849d7b3432f21eee6cc29c Mon Sep 17 00:00:00 2001 From: Astariul Date: Tue, 9 Apr 2024 09:19:43 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20issue=20when=20creating=20?= =?UTF-8?q?iOS=20simulator=20without=20device'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kebbie/emulator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kebbie/emulator.py b/kebbie/emulator.py index 9b1af07..019c6f6 100644 --- a/kebbie/emulator.py +++ b/kebbie/emulator.py @@ -246,7 +246,7 @@ def __init__( if self.platform == IOS: capabilities["deviceName"] = ios_name capabilities["platformVersion"] = ios_platform - capabilities["wdaLocalPort"] = 8000 + device + capabilities["wdaLocalPort"] = 8000 + (device if device is not None else 0) if self.platform == ANDROID and device is not None: capabilities["udid"] = device self.driver = webdriver.Remote(f"{host}:{port}", capabilities)