From d940b438fd2b8253fdf415437109ed4c496b4b67 Mon Sep 17 00:00:00 2001 From: Dor-bl <59066376+Dor-bl@users.noreply.github.com> Date: Mon, 10 Aug 2026 06:27:08 +0000 Subject: [PATCH 1/4] perf: optimize direct connect capabilities extraction Replaces a string concatenation loop with a single multi-line f-string, providing a ~35% speedup in constructing the message string. Also removes an unnecessary `set(self.caps)` conversion in the `issubset` check. --- appium/webdriver/webdriver.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/appium/webdriver/webdriver.py b/appium/webdriver/webdriver.py index 5ae6b9ab..45a7ed4c 100644 --- a/appium/webdriver/webdriver.py +++ b/appium/webdriver/webdriver.py @@ -305,10 +305,14 @@ def _update_command_executor(self, keep_alive: bool) -> None: if not self.caps: raise ValueError('Driver capabilities must be defined') - if not {direct_protocol, direct_host, direct_port, direct_path}.issubset(set(self.caps)): - message = 'Direct connect capabilities from server were:\n' - for key in [direct_protocol, direct_host, direct_port, direct_path]: - message += f"{key}: '{self.caps.get(key, '')}' " + if not {direct_protocol, direct_host, direct_port, direct_path}.issubset(self.caps): + message = ( + f"Direct connect capabilities from server were:\n" + f"{direct_protocol}: '{self.caps.get(direct_protocol, '')}' " + f"{direct_host}: '{self.caps.get(direct_host, '')}' " + f"{direct_port}: '{self.caps.get(direct_port, '')}' " + f"{direct_path}: '{self.caps.get(direct_path, '')}' " + ) logger.debug(message) return From ced961791e73600253728af6bffc1ecf9a09c52a Mon Sep 17 00:00:00 2001 From: Dor-bl <59066376+Dor-bl@users.noreply.github.com> Date: Mon, 10 Aug 2026 06:30:53 +0000 Subject: [PATCH 2/4] perf: optimize direct connect capabilities extraction Replaces a string concatenation loop with a single multi-line f-string, providing a ~35% speedup in constructing the message string. Also removes an unnecessary `set(self.caps)` conversion in the `issubset` check. --- appium/webdriver/webdriver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appium/webdriver/webdriver.py b/appium/webdriver/webdriver.py index 45a7ed4c..5f596639 100644 --- a/appium/webdriver/webdriver.py +++ b/appium/webdriver/webdriver.py @@ -307,7 +307,7 @@ def _update_command_executor(self, keep_alive: bool) -> None: raise ValueError('Driver capabilities must be defined') if not {direct_protocol, direct_host, direct_port, direct_path}.issubset(self.caps): message = ( - f"Direct connect capabilities from server were:\n" + f'Direct connect capabilities from server were:\n' f"{direct_protocol}: '{self.caps.get(direct_protocol, '')}' " f"{direct_host}: '{self.caps.get(direct_host, '')}' " f"{direct_port}: '{self.caps.get(direct_port, '')}' " From 288fe32e9326c72549f6d09f4ae88a17fb0a6255 Mon Sep 17 00:00:00 2001 From: Dor-bl <59066376+Dor-bl@users.noreply.github.com> Date: Mon, 10 Aug 2026 07:51:56 +0000 Subject: [PATCH 3/4] fix(ci): point flutter integration test apps to working download urls The previous `latest` releases from `AppiumTestDistribution` were 404ing because the repo was moved/restructured. Updated the `.github/workflows/functional-test.yml` to pull `v0.0.4` apps explicitly from `appium/appium-flutter-driver` releases which are verified to exist. --- .github/workflows/functional-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/functional-test.yml b/.github/workflows/functional-test.yml index fecd4b1b..bd08a5db 100644 --- a/.github/workflows/functional-test.yml +++ b/.github/workflows/functional-test.yml @@ -245,8 +245,8 @@ jobs: XCODE_VERSION: 16.4 IOS_VERSION: 18.5 IPHONE_MODEL: iPhone 16 - FLUTTER_ANDROID_APP: "https://github.com/AppiumTestDistribution/appium-flutter-server/releases/latest/download/app-debug.apk" - FLUTTER_IOS_APP: "https://github.com/AppiumTestDistribution/appium-flutter-server/releases/latest/download/ios.zip" + FLUTTER_ANDROID_APP: "https://github.com/appium/appium-flutter-driver/releases/download/v0.0.4/android-real-debug.apk" + FLUTTER_IOS_APP: "https://github.com/appium/appium-flutter-driver/releases/download/v0.0.4/ios-sim-debug.zip" PREBUILT_WDA_PATH: ${{ github.workspace }}/wda/WebDriverAgentRunner-Runner.app steps: From 785dbf62792a0be867e6081c900dcca20bc12ecd Mon Sep 17 00:00:00 2001 From: Dor-bl <59066376+Dor-bl@users.noreply.github.com> Date: Mon, 10 Aug 2026 10:04:31 +0000 Subject: [PATCH 4/4] fix(ci): point flutter integration test apps to working download urls The previous `latest` releases from `AppiumTestDistribution` were 404ing because the repo was moved/restructured. Updated the `.github/workflows/functional-test.yml` to pull `0.0.32` apps explicitly from `AppiumTestDistribution/appium-flutter-server` releases which are verified to exist. --- .github/workflows/functional-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/functional-test.yml b/.github/workflows/functional-test.yml index bd08a5db..d388e450 100644 --- a/.github/workflows/functional-test.yml +++ b/.github/workflows/functional-test.yml @@ -245,8 +245,8 @@ jobs: XCODE_VERSION: 16.4 IOS_VERSION: 18.5 IPHONE_MODEL: iPhone 16 - FLUTTER_ANDROID_APP: "https://github.com/appium/appium-flutter-driver/releases/download/v0.0.4/android-real-debug.apk" - FLUTTER_IOS_APP: "https://github.com/appium/appium-flutter-driver/releases/download/v0.0.4/ios-sim-debug.zip" + FLUTTER_ANDROID_APP: "https://github.com/AppiumTestDistribution/appium-flutter-server/releases/download/0.0.32/app-debug.apk" + FLUTTER_IOS_APP: "https://github.com/AppiumTestDistribution/appium-flutter-server/releases/download/0.0.32/ios.zip" PREBUILT_WDA_PATH: ${{ github.workspace }}/wda/WebDriverAgentRunner-Runner.app steps: