"GET_MOBILE_VALUE" Command

Description: This command is used to retrieve a value from a native mobile screen and store it in a variable. By default, it reads the text of a mobile locator, but if you want to read the value of a specific attribute, you can change the Attribute from “text” to the actual attribute name of interest. Type can be used to read a value of a mobile locator/node, boolean (true or false), number, or string.

Usage Scenario: Suppose we want to get the the date from Wikipedia app which appears on “Today on Wikipedia” section.

Procedure: Prepare steps that run the app and create a step with Get_Mobile_Value command that gets the text “Main page on Jan 7, 2021” highlighted below:

Your step will look like this:

image-20241113-103914.png

Once executed, the step will retrieve the entire text “Main page on Jan 7, 2021”. You can use Sub_String command to extract only the date as below:

 

 

 

Related pages