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 that is fulfilled with the text attached to the terminal emulator field.
- Type
- Promise.<string>
backgroundColor() → {Promise.<string>}
The background color of the terminal emulator field.
Returns:
a promise that is fulfilled with the background color of the terminal emulator field.
- Type
- Promise.<string>
color() → {Promise.<string>}
The color of the text in the terminal emulator field.
Returns:
a promise that is fulfilled with the color of the text in the terminal emulator field.
- Type
- Promise.<string>
getBackgroundColor()
This method is deprecated and will be removed in the next release.
Use TerminalEmulators.FieldTO#backgroundColor instead.
- Deprecated:
- Use the property TerminalEmulators.FieldTO#backgroundColor instead
getColor()
This method is deprecated and will be removed in the next release.
Use TerminalEmulators.FieldTO#color instead
- Deprecated:
- Use the property TerminalEmulators.FieldTO#color instead
id() → {Promise.<number>}
Returns the terminal emulator field ID.
Returns:
a promise that is fulfilled with the ID of the terminal emulator field..
- 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>
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 that is fulfilled with the terminal emulator text.
- Type
- Promise.<string>
waitUntilVisible(timeoutopt) → {Promise.<boolean>}
Waits until the 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 length of time to wait (in milliseconds) 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>