Skip to content

refactor: Applications extension to remove legacy command fallbacks#1233

Open
Dor-bl wants to merge 2 commits into
appium:masterfrom
Dor-bl:refactor-remove-applications-fallbacks-1308480277413524913
Open

refactor: Applications extension to remove legacy command fallbacks#1233
Dor-bl wants to merge 2 commits into
appium:masterfrom
Dor-bl:refactor-remove-applications-fallbacks-1308480277413524913

Conversation

@Dor-bl
Copy link
Copy Markdown
Contributor

@Dor-bl Dor-bl commented May 31, 2026

This pull request simplifies the Applications extension in the Appium Python client by removing legacy fallback code and dependencies on old command execution paths. All app-related operations now use the execute_script method directly for W3C extension commands, streamlining the codebase and reducing maintenance overhead.

Removal of Legacy/Fallback Logic

  • Removed all try/except blocks that provided fallbacks to classic Appium commands if W3C extension commands were unavailable, so only the W3C extension path is now used for methods like background_app, is_app_installed, install_app, remove_app, terminate_app, activate_app, and query_app_state. [1] [2] [3] [4] [5] [6] [7]

  • Removed the _add_commands method's registration of legacy Appium commands, as these are no longer needed.

Codebase Simplification

  • Removed imports and class inheritance related to legacy command presence checking and exception handling, such as CanRememberExtensionPresence, InvalidArgumentException, and UnknownMethodException.

  • Simplified all relevant methods to call self.execute_script directly, improving readability and maintainability. [1] [2] [3] [4] [5] [6] [7] [8]

Dor-bl added 2 commits May 31, 2026 21:23
Removed the try-except blocks and legacy command fallbacks in all
methods of the Applications extension class. The methods now
exclusively use 'mobile:' extension scripts via execute_script.
Also removed inheritance from CanRememberExtensionPresence and
emptied _add_commands as they are no longer required.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant