Skip to main content

GetTextIn

Description

Get text in a certain area relative to an element . The direction can be UP, DOWN, LEFT or RIGHT.

Parameters

NameValueDescription
ZoneString with one of the following values



* NATIVE

* WEB

* TEXT
Zones which define the way the element will be identified.
ElementStringSelect an Element
IndexIntegerElement index
Text ZoneString with one of the following values



* NATIVE

* WEB

* TEXT
The zone to extract the text from. See getText command for the options.
DirectionStringDirection to analyze - can be UP, Down, Left, Right or Inside
WidthIntegerWidth of the search
HeightIntegerHeight of the search

Usage

Command can be used to get text for certain area.

info

Replace <server> with the appropriate URL.

Example

In this example we will try to get all the text of the Web part from the EriBank Application.

Login to Eribank Application to get following screen

Using Object Spy find the Xpath corresponding to the "MakePayment". Use the code snippet below to use this command to get the text.

GetTextln

DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<server>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "<deviceid>");

...
...
String str0 = client.getTextIn("NATIVE", "accessibilityLabel=makePaymentButton", 0, "WEB", "Up", 0, 0);