Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add checkVersion option for mobile:installApp #736

Merged
merged 2 commits into from
Feb 8, 2024
Merged

Conversation

KazuCocoa
Copy link
Member

@KazuCocoa KazuCocoa commented Feb 8, 2024

appium/appium-android-driver#915 for uia2.
I noticed missing args about mobile: removeApp in the readme, so this pr includes it as well.

appium/appium#19754

README.md Outdated
@@ -812,6 +814,7 @@ allowTestPackages | boolean | no | Set to true in order to allow test packages i
useSdcard | boolean | no | Set to true to install the app on sdcard instead of the device memory. false by default | true
grantPermissions | boolean | no | Set to true in order to grant all the permissions requested in the application's manifest automatically after the installation is completed under Android 6+. The targetSdkVersion in the application manifest must be greater or equal to 23 and the Android version on the device under test must be greater or equal to Android 6 (API level 23) to grant permissions. Applications whose targetSdkVersion is lower than or equal to 22 must be reisntalled to grant permissions for Android 6+ devices. false by default | true
replace | boolean | no | Set it to false if you don't want the application to be upgraded/reinstalled if it is already present on the device, but throw an error instead. true by default | false
checkVersion | boolean | no | Set to true, in order to skip the application installation if the device under test has greater or equal to the application version. | true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also mention that by default an exception is thrown upon install if the same or an older app version is already installed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested with an older one, but the same version was installed successfully with checkVersion false (or not given) as default as -r. The behavior may depend on the replace.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, then only mention the older one

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensured that INSTALL_FAILED_VERSION_DOWNGRADE error occurs only for downgrade even with -r

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, the same version succeeded in installing without -r as well

@KazuCocoa KazuCocoa merged commit 95d46f4 into master Feb 8, 2024
9 checks passed
@KazuCocoa KazuCocoa deleted the version-check branch February 8, 2024 20:56
github-actions bot pushed a commit that referenced this pull request Feb 8, 2024
## [2.45.0](v2.44.3...v2.45.0) (2024-02-08)

### Features

* add checkVersion option for mobile:installApp ([#736](#736)) ([95d46f4](95d46f4))
Copy link

github-actions bot commented Feb 8, 2024

🎉 This PR is included in version 2.45.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants