Fix 'mobile: getAppStrings' method: add missing 'stringFile' parameter - #1094
Open
cobaltvo wants to merge 1 commit into
Open
Fix 'mobile: getAppStrings' method: add missing 'stringFile' parameter#1094cobaltvo wants to merge 1 commit into
cobaltvo wants to merge 1 commit into
Conversation
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The problem likely persists in the latest versions of the libraries as well.
Problem
When calling
getAndroidDriver().getAppStringMap(language, stringFile)from the Java client, thestringFileparameter is ignored. This happens because thegetStringsmethod inappium-android-driverdoesn't pass the customstringFilepath down toextractStringsFromResources. As a result, Appium falls back to pulling the APK from the device every single time application string resources are requested. On low-performance devices or slower networks, this dramatically slows down test execution and consumes unnecessary bandwidth.Solution
stringFilepath into the existingthis.optsobject using the spread operator ({ ...this.opts, app: stringFile }).