Object Model Reference for GUI Testing > Terminal Emulators > Set Method

TeField Object

Description

A terminal emulator field that fully supports HLLAPI.

IMPORTANT

The TeField object includes both unprotected fields, which can receive input, and protected fields, which contain fixed text.

Operations

The sections below list the built-in methods and properties that you can use as operations for the TeField object.

Note: You can also view a list and descriptions of the TeField description properties, for use in object repository descriptions, programmatic descriptions, checkpoint and output value steps, and as argument values for the GetTOProperty and GetROProperty methods.

Methods

Common Method CaptureBitmap Saves a screen capture of the object as a .png or .bmp image using the specified file name.
Common Method Check Checks whether the actual value of an item matches the expected value.
Common Method CheckProperty Checks whether the actual value of the specified object property matches the specified expected value within the specified timeout.
Common Method ChildObjects Returns the collection of child objects contained within the object.
Common Method GetROProperty Returns the current value of the description properties from the object in the application.
Common Method GetTOProperties Returns the collection of properties and values used to identify the object.
Common Method GetTOProperty Returns the value of the specified description properties from the test object description.
Common Method Output Retrieves the current value of an item and stores it in a specified location.
Common Method RefreshObject Instructs UFT to re-identify the object in the application the next time a step refers to this object.
Method Set Inserts text into an unprotected field.
Method SetCursorPos Places the cursor in the specified position within the field.
Method SetSecure Inserts text into a hidden (invisible) field.
Common Method SetTOProperty Sets the value of the specified description properties in the test object description.
Common Method ToString Returns a string that represents the test object.
Common Method WaitProperty Waits until the specified object property achieves the specified value or exceeds the specified timeout before continuing to the next step.

Properties

Common Property Exist Checks whether the object currently exists in the open application.
Property Text Returns the contents of a field.

 

Back to top

Set Method

Description

Inserts text into an unprotected field.

Syntax

object.Set Text, [PositionInField]

Arguments

Parameter Description
Text Required. A String value.
The text to be inserted in the field.
PositionInField Optional. A long integer value.
The offset of the insertion position from the first character in the field (in characters). If no offset is specified, the default is 0.
Default value = 0

Return Type

None

IMPORTANT

The Set method can be used for any unprotected field. However, when recording, the Set method is used for unprotected visible fields, and the SetSecure method is used for hidden fields. For more information, see SetSecure.

Example


 

Back to top

SetCursorPos Method

Description

Places the cursor in the specified position within the field.

Syntax

object.SetCursorPos [PositionInField]

Arguments

Parameter Description
PositionInField Optional. A long integer value.
The offset of the insertion position from the first character in the field (in characters). If no offset is specified, the default is 0.
Default value = 0

Return Type

None

Example


 

Back to top

SetSecure Method

Description

Inserts text into a hidden (invisible) field.

Syntax

object.SetSecure CodedString

Arguments

Parameter Description
CodedString Required. A String value.
UFT decodes and inserts the coded string into the field.

Return Type

None

IMPORTANT

A hidden field is typically used for a password. The SetSecure method is recorded when a password or other secure text is entered. The text is encrypted while recording, and decrypted during the test run.

Note: The Set method can be used instead of the SetSecure method for any unprotected or hidden field. However, when recording, the Set method is used for unprotected fields and the SetSecure method for hidden fields. For more information, see Set.

Tip: To find the encrypted value to use as the argument for the SetSecure method, use the Password Encoder utility (Start > All Programs > HPE Software > Unified Functional Testing > Tools > Password Encoder) or parameterize the argument using a Data Table pararmeter and use the Data Table encryption option (right-click each unencrypted value in the password column and choose Data > Encrypt). For more information, refer to the Unified Functional Testing User Guide.

While the SetSecure method enables you to hide passwords on the screen during a run session, it is not intended to be a secure way to protect password information.

Example


 

Back to top

Text Property

Description

Returns the contents of a field.

Syntax

object.Text

Value Type

A String value.

Property type

Read-only property

Example


Back to top

See also: