Open topic with navigation

# FieldTO

## TerminalEmulators. FieldTO

FieldTO

## Constructor

## new FieldTO()

A terminal emulator field that fully supports HLLAPI.

# Methods

## attachedText() → {Promise.<string>}

The text attached to the terminal emulator field.

##### Returns:

a promise this is fulfilled with the text attached to the terminal emulator field.

Type
  Promise.<string>

## id() → {Promise.<number>}

Returns the terminal emulator field ID.

##### Returns:

a promise that is fulfilled with the object's terminal emulator field ID.

Type
  Promise.<number>

## isNumeric() → {Promise.<boolean>}

The Numeric attribute of the terminal emulator field.

##### Returns:

a promise that is fulfilled with an indication of whether the field is numeric or not.

Type
  Promise.<boolean>

## isProtected() → {Promise.<boolean>}

The Protected attribute of the terminal emulator field.

##### Returns:

a promise that is fulfilled with an indication of whether the field is protected or not.

Type
  Promise.<boolean>

## waitUntilVisible(timeout[opt]) → {Promise.<boolean>}

Waits until this test object becomes visible or the timeout elapses. This method is useful for synchronizing your test with your application.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`timeout` | number | <optional> | The time (in milliseconds) to wait for the test object to become visible.

##### Returns:

a promise fulfilled with true if test object becomes visible before the timeout is reached; otherwise, false.

Type
  Promise.<boolean>

## isVisible() → {Promise.<boolean>}

The Visible attribute of the terminal emulator field.

##### Returns:

a promise that is fulfilled with an indication of whether the field is visible or not.

Type
  Promise.<boolean>

## length() → {Promise.<number>}

Returns the terminal emulator field length.

##### Returns:

a promise that is fulfilled with the object's terminal emulator field length.

Type
  Promise.<number>

## setCursor(offsetopt) → {Promise.<void>}

Places the cursor in the specified position within the field.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`offset` | number | <optional> | If a number is passed, it will set the position in the field.

##### Returns:

a promise that is fulfilled when the setCursor operation ends.

Type
  Promise.<void>

## setSecure(codedString) → {Promise.<void>}

Inserts text into a hidden (invisible) field.

##### Parameters:

Name | Type | Description
--- | --- | ---
`codedString` | string | If a string is passed, it will copy the coded string into the field.

##### Returns:

a promise that is fulfilled when the setSecure operation ends.

Type
  Promise.<void>

## setText(Text, offsetopt) → {Promise.<void>}

Inserts text into an unprotected field.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`Text` | string |  | that is inserted in the field.
`offset` | number | <optional> | If a number is passed, it will copy the string to that position in the field.

##### Returns:

a promise that is fulfilled when the setText operation ends.

Type
  Promise.<void>

## startPosition() → {Promise.<Object>}

The terminal emulator field's start column and start row properties.

##### Returns:

a promise that is fulfilled with the object's startPosition.

Type
  Promise.<Object>

## text() → {Promise.<string>}

The terminal emulator field text.

##### Returns:

a promise this is fulfilled with the terminal emulator text.

Type
  Promise.<string>