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

String GetText(Zone)

Supported in iOS Supported in Android

Description

Get all text by a specific SeeTestAutomation- Zone from entire screen of the device reflection.

Parameters

  • SeeTestAutomation- Zone: Select a Zone to get all text from.
  • NATIVE: All text properties of the Native dump on the screen
  • WEB: All text properties of the Web dump on the screen
  • TEXT: it will get you all the text that appears on the screen.
  • Default (or another  grouping zone name): All names of elements which are on the Object repository that appear on the screen in the chosen zone.

Usage

Zone Native

Will retrieve all the text properties of Native objects on the screen of the device on instrumented native applications or non-instrumented mode.

Note: Text properties will not be retrieved for elements which doesn’t have text property on the object spy.

Scenario: In the following example we will use getText with zone NATIVE on the  login screen of ebay application.

 

Zone Web

Command usage: Will retrieve all the text properties of Web objects on the screen of the device on instrumented hybrid applications or Mobile web sites.

Note: Text properties will not be retrieved for elements which doesn’t have text property on the object spy

Scenario: In the following example we will use getText with zone WEB on the cnn web page.

Code Examples

Java Example
String str = client.getText("NATIVE")
C# Example
String str = client.GetText("NATIVE")
VBScript Example
str = client.GetText("NATIVE")
Python Example
var0 = self.client.getText("NATIVE")
Perl Example
my $str0 = $client->getText("NATIVE")
  • No labels