Skip to content

Fix 'mobile: getAppStrings' method: add missing 'stringFile' parameter - #1094

Open
cobaltvo wants to merge 1 commit into
appium:masterfrom
cobaltvo:user/cobaltvo/fix_get_app_strings
Open

Fix 'mobile: getAppStrings' method: add missing 'stringFile' parameter#1094
cobaltvo wants to merge 1 commit into
appium:masterfrom
cobaltvo:user/cobaltvo/fix_get_app_strings

Conversation

@cobaltvo

@cobaltvo cobaltvo commented Aug 6, 2026

Copy link
Copy Markdown

Context

  • Java client (io.appium:java-client, 10.1.1)
  • Appium server (appium, 3.5.2)
  • UiAutomator driver (appium-uiautomator2-driver, 8.0.0)

The problem likely persists in the latest versions of the libraries as well.

Problem

When calling getAndroidDriver().getAppStringMap(language, stringFile) from the Java client, the stringFile parameter is ignored. This happens because the getStrings method in appium-android-driver doesn't pass the custom stringFile path down to extractStringsFromResources. 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

  • Merged the custom stringFile path into the existing this.opts object using the spread operator ({ ...this.opts, app: stringFile }).
  • This ensures that the custom APK path is respected while keeping all other driver options intact.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Aug 6, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: cobaltvo / name: Cobalt (1f669c0)

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