Constructor
new TextScreenTO()
Methods
click(argsopt) → {Promise.<void>}
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args | Object |
<optional> | The arguments for the click operation.
Properties
|
Returns:
- Type
- Promise.<void>
clickPosition(position) → {Promise.<void>}
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
position | Object | If a Position object is passed,
the method clicks on the position within the emulator screen.
Properties
|
Returns:
- Type
- Promise.<void>
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>
sendKeys(inputopt, modifiersopt) → {Promise.<void>}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
input | string |
<optional> | The string to send to the object. Use FunctionKeys and Keys for special keys. | |
modifiers | KeyModifier |
<optional> | KeyModifier.none | The modifier keys. Use KeyModifier for this parameter. |
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 method 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>