Table of Contents

Interface IScreenBase

Namespace
HP.LFT.SDK.TE
Assembly
HP.LFT.SDK.dll

A Terminal Emulator Base Screen.

public interface IScreenBase

Properties

Size

The column count and row count of the terminal emulator screen. Represented by the Size object.

Size Size { get; }

Property Value

Size

Methods

GetText()

Returns the text from the specified screen rectangle.

string GetText()

Returns

string

GetText(Area)

Returns the text from the specified screen rectangle.

string GetText(Area area)

Parameters

area Area

The specified Area screen rectangle.

Returns

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;

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.

void Sync(long milliseconds)

Parameters

milliseconds long

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)

bool WaitForText(StringProperty text)

Parameters

text StringProperty

The specified StringProperty for which the emulator screen is waiting. This parameter could be represented as a string or a regular expression.

Returns

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)

bool WaitForText(StringProperty text, Area area)

Parameters

text StringProperty

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

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)

bool WaitForText(StringProperty text, Area area, long milliseconds)

Parameters

text StringProperty

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.

milliseconds long

The amount of time the emulator screen waits after a response.

Returns

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)

bool WaitForText(StringProperty text, long milliseconds)

Parameters

text StringProperty

The specified StringProperty for which the emulator screen is waiting. This parameter could be represented as a string or a regular expression.

milliseconds long

The amount of time the emulator screen waits after a response.

Returns

bool

True if the text was found; otherwise False.