From 1ef3000e95dadda43add4ae2980ced18f913f4bc Mon Sep 17 00:00:00 2001 From: Dor-bl <59066376+Dor-bl@users.noreply.github.com> Date: Mon, 10 Aug 2026 06:30:50 +0000 Subject: [PATCH 1/3] refactor: remove legacy fallback for clipboard extension commands --- appium/webdriver/extensions/clipboard.py | 29 +++----------------- appium/webdriver/mobilecommand.py | 2 -- test/unit/webdriver/device/clipboard_test.py | 6 ---- 3 files changed, 4 insertions(+), 33 deletions(-) diff --git a/appium/webdriver/extensions/clipboard.py b/appium/webdriver/extensions/clipboard.py index f5354f2e7..bd01bb452 100644 --- a/appium/webdriver/extensions/clipboard.py +++ b/appium/webdriver/extensions/clipboard.py @@ -15,18 +15,14 @@ import base64 from typing import Optional -from selenium.common.exceptions import UnknownMethodException from typing_extensions import Self from appium.protocols.webdriver.can_execute_commands import CanExecuteCommands from appium.protocols.webdriver.can_execute_scripts import CanExecuteScripts -from appium.protocols.webdriver.can_remember_extension_presence import CanRememberExtensionPresence from appium.webdriver.clipboard_content_type import ClipboardContentType -from ..mobilecommand import MobileCommand as Command - -class Clipboard(CanExecuteCommands, CanExecuteScripts, CanRememberExtensionPresence): +class Clipboard(CanExecuteCommands, CanExecuteScripts): def set_clipboard( self, content: bytes, content_type: str = ClipboardContentType.PLAINTEXT, label: Optional[str] = None ) -> Self: @@ -48,11 +44,7 @@ def set_clipboard( } if label: options['label'] = label - try: - self.assert_extension_exists(ext_name).execute_script(ext_name, options) - except UnknownMethodException: - # TODO: Remove the fallback - self.mark_extension_absence(ext_name).execute(Command.SET_CLIPBOARD, options) + self.execute_script(ext_name, options) return self def set_clipboard_text(self, text: str, label: Optional[str] = None) -> Self: @@ -79,11 +71,7 @@ def get_clipboard(self, content_type: str = ClipboardContentType.PLAINTEXT) -> b """ ext_name = 'mobile: getClipboard' options = {'contentType': content_type} - try: - base64_str = self.assert_extension_exists(ext_name).execute_script(ext_name, options) - except UnknownMethodException: - # TODO: Remove the fallback - base64_str = self.mark_extension_absence(ext_name).execute(Command.GET_CLIPBOARD, options)['value'] + base64_str = self.execute_script(ext_name, options) return base64.b64decode(base64_str) def get_clipboard_text(self) -> str: @@ -95,13 +83,4 @@ def get_clipboard_text(self) -> str: return self.get_clipboard(ClipboardContentType.PLAINTEXT).decode('UTF-8') def _add_commands(self) -> None: - self.command_executor.add_command( - Command.SET_CLIPBOARD, - 'POST', - '/session/$sessionId/appium/device/set_clipboard', - ) - self.command_executor.add_command( - Command.GET_CLIPBOARD, - 'POST', - '/session/$sessionId/appium/device/get_clipboard', - ) + pass diff --git a/appium/webdriver/mobilecommand.py b/appium/webdriver/mobilecommand.py index ed8dc6f80..bf422f9d1 100644 --- a/appium/webdriver/mobilecommand.py +++ b/appium/webdriver/mobilecommand.py @@ -51,8 +51,6 @@ class MobileCommand: PUSH_FILE = 'pushFile' PULL_FILE = 'pullFile' PULL_FOLDER = 'pullFolder' - GET_CLIPBOARD = 'getClipboard' - SET_CLIPBOARD = 'setClipboard' FINGER_PRINT = 'fingerPrint' GET_SETTINGS = 'getSettings' UPDATE_SETTINGS = 'updateSettings' diff --git a/test/unit/webdriver/device/clipboard_test.py b/test/unit/webdriver/device/clipboard_test.py index 3708b2a3a..d5a33a2ce 100644 --- a/test/unit/webdriver/device/clipboard_test.py +++ b/test/unit/webdriver/device/clipboard_test.py @@ -22,9 +22,6 @@ class TestWebDriverClipboard: @httpretty.activate def test_set_clipboard_with_url(self): driver = android_w3c_driver() - httpretty.register_uri( - httpretty.POST, appium_command('/session/1234567890/appium/device/set_clipboard'), body='{"value": ""}' - ) httpretty.register_uri( httpretty.POST, appium_command('/session/1234567890/execute/sync'), @@ -40,9 +37,6 @@ def test_set_clipboard_with_url(self): @httpretty.activate def test_set_clipboard_text(self): driver = ios_w3c_driver() - httpretty.register_uri( - httpretty.POST, appium_command('/session/1234567890/appium/device/set_clipboard'), body='{"value": ""}' - ) httpretty.register_uri( httpretty.POST, appium_command('/session/1234567890/execute/sync'), From 80b847db674b5886bd4a8a85c47d7e5c6a30ab97 Mon Sep 17 00:00:00 2001 From: Dor-bl <59066376+Dor-bl@users.noreply.github.com> Date: Mon, 10 Aug 2026 07:16:20 +0000 Subject: [PATCH 2/3] fix: resolve functional test CI failures --- .github/workflows/functional-test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/functional-test.yml b/.github/workflows/functional-test.yml index fecd4b1b1..be5dc1952 100644 --- a/.github/workflows/functional-test.yml +++ b/.github/workflows/functional-test.yml @@ -65,7 +65,7 @@ jobs: defaults write com.apple.iphonesimulator PasteboardAutomaticSync -bool false open -Fn "$(xcode-select --print-path)/Applications/Simulator.app" - name: Prepare iOS simulator - uses: futureware-tech/simulator-action@v5 + uses: futureware-tech/simulator-action@v4 with: model: ${{ env.IPHONE_MODEL }} os_version: ${{ env.IOS_VERSION }} @@ -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/AppiumTestDistribution/appium-flutter-server/releases/download/0.0.33/app-debug.apk" + FLUTTER_IOS_APP: "https://github.com/AppiumTestDistribution/appium-flutter-server/releases/download/0.0.33/ios.zip" PREBUILT_WDA_PATH: ${{ github.workspace }}/wda/WebDriverAgentRunner-Runner.app steps: @@ -333,7 +333,7 @@ jobs: defaults write com.apple.iphonesimulator PasteboardAutomaticSync -bool false open -Fn "$(xcode-select --print-path)/Applications/Simulator.app" - - uses: futureware-tech/simulator-action@v5 + - uses: futureware-tech/simulator-action@v4 if: matrix.e2e-tests == 'flutter-ios' with: # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md From 04178bd380336f195bb98f3c36159059c08d1332 Mon Sep 17 00:00:00 2001 From: Dor-bl <59066376+Dor-bl@users.noreply.github.com> Date: Mon, 10 Aug 2026 08:09:20 +0000 Subject: [PATCH 3/3] fix: resolve functional test CI failures and uiautomator timeout --- test/functional/android/options.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/functional/android/options.py b/test/functional/android/options.py index 9c8103a75..7ccaf30ba 100644 --- a/test/functional/android/options.py +++ b/test/functional/android/options.py @@ -29,6 +29,7 @@ def make_options(app: Optional[str] = None) -> UiAutomator2Options: options.automation_name = 'UIAutomator2' options.new_command_timeout = 240 options.uiautomator2_server_install_timeout = 120000 + options.uiautomator2_server_launch_timeout = 120000 options.adb_exec_timeout = 120000 if app is not None: