Interface IScreenBase
A Terminal Emulator Base Screen.
Namespace: HP.LFT.SDK.TE
Assembly: HP.LFT.SDK.dll
Syntax
public interface IScreenBase
Properties
Size
The column count and row count of the terminal emulator screen. Represented by the Size object.
Declaration
Size Size { get; }
Property Value
| Type | Description |
|---|---|
| Size |
Methods
GetText()
Returns the text from the specified screen rectangle.
Declaration
string GetText()
Returns
| Type | Description |
|---|---|
| string |
GetText(Area)
Returns the text from the specified screen rectangle.
Declaration
string GetText(Area area)
Parameters
| Type | Name | Description |
|---|---|---|
| Area | area | The specified Area screen rectangle. |
Returns
| Type | Description |
|---|---|
| string |
Sync()
Waits until a response is received from the host and the emulator status is set to Ready, or until the timeout is reached, before continuing with the run session. The default value for milliseconds is 0;
Declaration
void Sync()
Sync(long)
Waits until a response is received from the host and the emulator status is set to Ready, or until the timeout is reached, before continuing with the run session.
Declaration
void Sync(long milliseconds)
Parameters
| Type | Name | Description |
|---|---|---|
| long | milliseconds | The amount of time for which the session waits after a response. |
WaitForText(StringProperty)
Waits for specified text to appear on the emulator screen before continuing the run session.
Example 1: This example uses the WaitForText method to wait 10 seconds for a string defined as a regular expression, for example: "CH70001 LAST ACCESS AT 14:27:07 ON THURSDAY"
WaitForText(As.RegExp(@".*LAST ACCESS AT \d\d:\d\d:\d\d ON .*DAY.*"), new Area(3, 1, 3, 80), 10000)
Example 2: This example uses the WaitForText method to wait 5 seconds for a string, for example: "User":
WaitForText("User", new Area(3, 1, 3, 80), 5000)
Declaration
bool WaitForText(StringProperty text)
Parameters
| Type | Name | Description |
|---|---|---|
| StringProperty | text | The specified StringProperty for which the emulator screen is waiting. This parameter could be represented as a string or a regular expression. |
Returns
| Type | Description |
|---|---|
| bool | True if the text was found; otherwise False. |
WaitForText(StringProperty, Area)
Waits for specified text to appear on the emulator screen before continuing the run session.
Example 1: This example uses the WaitForText method to wait 10 seconds for a string defined as a regular expression, for example: "CH70001 LAST ACCESS AT 14:27:07 ON THURSDAY":
WaitForText(As.RegExp(@".*LAST ACCESS AT \d\d:\d\d:\d\d ON .*DAY.*"), new Area(3, 1, 3, 80), 10000)
Example 2: This example uses the WaitForText method to wait 5 seconds for a string, for example: "User":
WaitForText("User", new Area(3, 1, 3, 80), 5000)
Declaration
bool WaitForText(StringProperty text, Area area)
Parameters
| Type | Name | Description |
|---|---|---|
| StringProperty | text | The specified StringProperty for which the emulator screen is waiting. This parameter could be represented as a string or a regular expression. |
| Area | area | The Area where the specified text exists. |
Returns
| Type | Description |
|---|---|
| bool | True if the text was found; otherwise False. |
WaitForText(StringProperty, Area, long)
Waits for a specified text to appear on the emulator screen before continuing the run session.
Example 1: This example uses the WaitForText method to wait 10 seconds for the string defined as a regular expression, for example: "CH70001 LAST ACCESS AT 14:27:07 ON THURSDAY":
WaitForText(As.RegExp(@".*LAST ACCESS AT \d\d:\d\d:\d\d ON .*DAY.*"), new Area(3, 1, 3, 80), 10000)
Example 2: This example uses the WaitForText method to wait 5 seconds for a string, for example: "User":
WaitForText("User", new Area(3, 1, 3, 80), 5000)
Declaration
bool WaitForText(StringProperty text, Area area, long milliseconds)
Parameters
| Type | Name | Description |
|---|---|---|
| StringProperty | text | The specified StringProperty for which the emulator screen is waiting. This parameter could be represented as a string or a regular expression. |
| Area | area | The Area where the specified text exists. |
| long | milliseconds | The amount of time the emulator screen waits after a response. |
Returns
| Type | Description |
|---|---|
| bool | True if the text was found; otherwise False. |
WaitForText(StringProperty, long)
Waits for specified text to appear on the emulator screen before continuing the run session.
Example 1: This example uses the WaitForText method to wait 10 seconds for a string defined as a regular expression. for example: "CH70001 LAST ACCESS AT 14:27:07 ON THURSDAY"
WaitForText(As.RegExp(@".*LAST ACCESS AT \d\d:\d\d:\d\d ON .*DAY.*"), new Area(3, 1, 3, 80), 10000)
Example 2: This example uses the WaitForText method to wait 5 seconds for a string, for example: "User":
WaitForText("User", new Area(3, 1, 3, 80), 5000)
Declaration
bool WaitForText(StringProperty text, long milliseconds)
Parameters
| Type | Name | Description |
|---|---|---|
| StringProperty | text | The specified StringProperty for which the emulator screen is waiting. This parameter could be represented as a string or a regular expression. |
| long | milliseconds | The amount of time the emulator screen waits after a response. |
Returns
| Type | Description |
|---|---|
| bool | True if the text was found; otherwise False. |