GetTextIn ( Zone, Element, Index, Text Zone, Direction, Width, Height)
|
|
|
|
|
|
|
Matching command to getText command . Get text in a certain area relative to an element . The direction can be UP, DOWN, LEFT or RIGHT.
Zone: Select Zone
Element: Select an Element
Index: Element index
Text Zone: The zone to extract the text from. See getText command for the options.
Direction: Direction to analyze - can be UP, Down, Left, Right or Inside (to get the text inside the element).
Width: Width of the search ("0" indicates until the end/start of the window)
Height: Height of the search ("0" indicates until the end/start of the window)
In this example we will try to get all the text of the Web part from the EriBank Application
Step 1: Login and navigate to the Make Payment page.
Step 2: Now we want to extract the text of balance and we want to make sure it is above the “Make Payment” button. We will use the button as the element to search
Step 3: In the script area type in the command “GetTextIn” and fill up the following properties.
Result:
String str0 = client.getTextIn("NATIVE", "accessibilityLabel=makePaymentButton", 0, "WEB", "Up", 0, 0);string str0 = client.GetTextIn("NATIVE", "accessibilityLabel=makePaymentButton", 0, "WEB", "Up", 0, 0);str0=client.GetTextIn("NATIVE","accessibilityLabel=makePaymentButton", 0, "WEB", "Up", 0, 0 )Reportvar0 = self.client.getTextIn2("NATIVE", "accessibilityLabel=makePaymentButton", 0, "WEB", "Up", 0, 0)my $str0 = $client->getTextIn2("NATIVE", "accessibilityLabel=makePaymentButton", 0, "WEB", "Up", 0, 0);