Interface IScreenBase
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
Methods
GetText()
Returns the text from the specified screen rectangle.
string GetText()
Returns
GetText(Area)
Returns the text from the specified screen rectangle.
string GetText(Area area)
Parameters
Returns
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
millisecondslongThe 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
textStringPropertyThe 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
textStringPropertyThe specified StringProperty for which the emulator screen is waiting. This parameter could be represented as a string or a regular expression.
areaAreaThe 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
textStringPropertyThe specified StringProperty for which the emulator screen is waiting. This parameter could be represented as a string or a regular expression.
areaAreaThe Area where the specified text exists.
millisecondslongThe 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
textStringPropertyThe specified StringProperty for which the emulator screen is waiting. This parameter could be represented as a string or a regular expression.
millisecondslongThe amount of time the emulator screen waits after a response.
Returns
- bool
True if the text was found; otherwise False.