Constructor
new ScreenTO()
Methods
cursorPosition() → {Promise.<Object>}
Returns:
- Type
- Promise.<Object>
getText(areaopt) → {Promise.<string>}
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
area | Object |
<optional> | If an Area object is passed, the method returns the string from that location.
Properties
|
Returns:
- Type
- Promise.<string>
id() → {Promise.<number>}
Returns:
- Type
- Promise.<number>
inputFieldCount() → {Promise.<number>}
Returns:
- Type
- Promise.<number>
label() → {Promise.<string>}
Returns:
- Type
- Promise.<string>
protectedFieldCount() → {Promise.<number>}
Returns:
- Type
- Promise.<number>
sendTEKeys(keys) → {Promise.<void>}
Parameters:
Name | Type | Description |
---|---|---|
keys | string | Keys | The string or terminal emulator keys to type in the object. |
Returns:
- Type
- Promise.<void>
setCursorPosition(positionOrRow, columnopt) → {Promise.<void>}
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
positionOrRow | Object | number | If an object is passed,
it specifies the new position of the cursor within the emulator screen. If a number is passed, it is interpreted as a row. Properties
| |||||||||||||
column | number |
<optional> | If a number is passed, it changes the position of the cursor within the emulator screen. |
Returns:
- Type
- Promise.<void>
setText(Text, positionOrRowopt, columnopt) → {Promise.<void>}
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Text | string | The string that is written in the specified position within the emulator screen. | |||||||||||||
positionOrRow | Object | number |
<optional> | If an object is passed, the string is written to that location. If a number is passed, it is interpreted as a row. Properties
| ||||||||||||
column | number |
<optional> | If a number is passed, the string is written to this location. |
Returns:
- Type
- Promise.<void>
size() → {Promise.<Object>}
Returns:
- Type
- Promise.<Object>
sync(millisecondsopt) → {Promise.<void>}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
milliseconds | number |
<optional> | If a number is passed, the methods waits this number of milliseconds for a response. |
Returns:
- Type
- Promise.<void>
waitForText(text, millisecondsopt) → {Promise.<boolean>}
Example 1:
Use the waitForText method to wait 10 seconds for the string "CH70001 LAST ACCESS AT 14:27:07 ON THURSDAY", where this string is defined as a regular expression:
waitForText(new RegExp(".*LAST ACCESS AT \d\d:\d\d:\d\d ON .*DAY.*"), 10000)
Example 2:
Use the waitForText method to wait 5 seconds for the string "User":
waitForText("User", 5000)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
text | string | RegExp | The specified string or regular expression for which the emulator screen is waiting. | |
milliseconds | number |
<optional> | If a number is passed, the method waits this number of milliseconds for a response. |
Returns:
- Type
- Promise.<boolean>
waitForTextInArea(text, area, millisecondsopt) → {Promise.<boolean>}
Example 1:
Use the waitForText method to wait 10 seconds for the string, "CH70001 LAST ACCESS AT 14:27:07 ON THURSDAY", where this string is defined as a regular expression:
waitForText(new RegExp(".*LAST ACCESS AT \d\d:\d\d:\d\d ON .*DAY.*"), {top: 6, left: 53, bottom: 6, right: 60}, 10000)
Example 2:
Use the waitForText method to wait 5 seconds for the string User":
waitForText("User", {top: 6, left: 53, bottom: 6, right: 60}, 5000)
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
text | string | RegExp | The specified string or regular expression for which the emulator screen is waiting. | ||||||||||||||||
area | Object | If an Area object is passed, the method waits for text from that location. If a number is passed, the method waits this number of milliseconds for a response.. Properties
| ||||||||||||||||
milliseconds | number |
<optional> | If a number is passed, the method waits this number of milliseconds for a response. |
Returns:
- Type
- Promise.<boolean>