Page tree
Skip to end of metadata
Go to start of metadata

Description

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


Parameters

Name

Value

Description

Zone

String 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 Zone

String 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 UPDownLeftRight or Inside
WidthInteger

Width of the search

HeightIntegerHeight of the search

Usage

Command can be used to get text for certain area.

Set Experitest Url

Please make sure you replace <EXPERITEST_URL> with appropriate URL in the code snippet below.

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("<EXPERITEST_URL>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "<deviceid>");
           
...
...
String str0 = client.getTextIn("NATIVE", "accessibilityLabel=makePaymentButton", 0, "WEB", "Up", 0, 0);




  • No labels