TextCapture Method (TestObject)

Class

TestObject.

Action

Returns the text in this object's visible area.

Capturing text in combo boxes may append the text character "6". This is because the drop-down arrow for a combo box is the Marlett font drop-down arrow text symbol, which is the number "6" for most other fonts.

Syntax

C#
result = testObject.TextCapture([captureRectangle])
VB
result = testObject.TextCapture([captureRectangle])
Variable Description
result The text in this object's visible area. String.
captureRectangle Optional: the defined rectangular region where the text will be captured, relative to the window's coordinates. Rectangle.

Examples

VB

Dim partialText As String
partialText = testApplication.TextCapture(new Rectangle(1, 1, 200, 30))
Dim fullText As String
fullText = testApplication.TextCapture()