@@ -43,7 +43,7 @@ public AppiumDriver(URL remoteAddress, Capabilities desiredCapabilities){
4343 ImmutableMap .Builder <String , CommandInfo > builder = ImmutableMap .builder ();
4444 builder
4545 .put (RESET , postC ("/session/:sessionId/appium/app/reset" ))
46- .put (GET_STRINGS , getC ("/session/:sessionId/appium/app/strings" ))
46+ .put (GET_STRINGS , postC ("/session/:sessionId/appium/app/strings" ))
4747 .put (KEY_EVENT , postC ("/session/:sessionId/appium/device/keyevent" ))
4848 .put (CURRENT_ACTIVITY , getC ("/session/:sessionId/appium/device/current_activity" ))
4949 .put (SET_VALUE , postC ("/session/:sessionId/appium/element/:id/value" ))
@@ -96,7 +96,7 @@ public void resetApp() {
9696 }
9797
9898 /**
99- * Get all defined Strings from an Android app
99+ * Get all defined Strings from an Android app for the default language
100100 *
101101 * @return a string of all the localized strings defined in the app
102102 */
@@ -105,6 +105,20 @@ public String getAppStrings() {
105105 return response .getValue ().toString ();
106106 }
107107
108+ /**
109+ * Get all defined Strings from an Android app for the specified language
110+ *
111+ * @param language strings language code
112+ * @return a string of all the localized strings defined in the app
113+ */
114+ public String getAppStrings (String language ) {
115+ ImmutableMap .Builder builder = ImmutableMap .builder ();
116+ builder .put ("language" , language );
117+ ImmutableMap <String , Integer > parameters = builder .build ();
118+ Response response = execute (GET_STRINGS , parameters );
119+ return response .getValue ().toString ();
120+ }
121+
108122 /**
109123 * Send a key event to the device
110124 *
0 commit comments