Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
SEO Metadata
titleSeeTest Automation- Get Text

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

String GetText(Zone)

Supported_os
SupportWMobiletrue
SupportIOStrue
SupportSymbiantrue
SupportAndroidtrue
SupportWPtrue
SupportBBtrue

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.

Info
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.

Info
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

Code Block
languagejava
titleJava Example
linenumberstrue
String str = client.getText("NATIVE")
Code Block
languagec#
titleC# Example
linenumberstrue
collapsetrue
String str = client.GetText("NATIVE")
Code Block
languagevb
titleVBScript Example
linenumberstrue
collapsetrue
str = client.GetText("NATIVE")
Code Block
languagepy
titlePython Example
linenumberstrue
collapsetrue
var0 = self.client.getText("NATIVE")
Code Block
languageperl
titlePerl Example
linenumberstrue
collapsetrue
my $str0 = $client->getText("NATIVE")