text, objecttext, content, objectcontent, getcontent, scriptless, script-less, scripted, step, view, stepview

Method GetText

Retrieves visible text from object

Watch this video to learn how to use this method

Have a problem with playback?

Usage

Function GetText( 
    Boolean AlternativeMethod [Optional]
)

Step

GetText

false

Boolean AlternativeMethod [Optional]

Parameters

AlternativeMethod (optional)

Type: Boolean

Default value: false

Uses an alternative method to get text from object. Set this parameter to true if normal method does not provide adequate results

Returns

Result text string or empty string if text was not found

Example

VBScript

objectText = Application("Demo").View("DemoView").Object("DemoTextObject")GetText()
If objectText = "" Then
    'try to get text from object using alternative method
    objectText = Application("Demo").View("DemoView").Object("DemoTextObject")GetText(true)
End If

JavaScript

var objectText = Application("Demo").View("DemoView").Object("DemoTextObject").GetText();
if (objectText == "") {
    // try to get text from object using alternative method
    objectText = Application("Demo").View("DemoView").Object("DemoTextObject").GetText(true);
}

Comment

Get text from object

Step

GetText

Comment

Use alternative method to get text from object

Step

GetText

true

Contact Us

Tower Place 100

3340 Peachtree Rd NE #1800 

Atlanta, GA 30326 USA

(404) 814-5227