Interface ScreenBase

All Known Subinterfaces:
Screen, TextScreen

public interface ScreenBase
A Terminal Emulator Base Screen.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the Terminal Emulator screen column count and row count.
    Returns the Text from the specified screen rectangle.
    getText(Area area)
    Returns the Text from the specified screen rectangle.
    void
    Waits until a response is received from the host and the emulator.
    void
    sync(long milliseconds)
    Waits until a response is received from the host and the emulator.
    Waits for a specified text to appear on the emulator screen before continuing the run session.

    Example 1:
    The following example uses the waitForText method to wait 10 seconds for a string defined as regular expression, for example: CH70001 LAST ACCESS AT 14:27:07 ON THURSDAY:
    waitForText(new RegExpProperty(@".*LAST ACCESS AT \d\d:\d\d:\d\d ON .*DAY.*"), new Area(3, 1, 3, 80), 10000)

    Example 2:
    The following example uses the waitForText method to wait 5 seconds for a string, for example: "User":
    waitForText("User", new Area(3, 1, 3, 80), 5000)
    waitForText(StringProperty text, long milliseconds)
    Waits for a specified text to appear on the emulator screen before continuing the run session.

    Example 1:
    The following example uses the waitForText method to wait 10 seconds for a string defined as regular expression, for example: CH70001 LAST ACCESS AT 14:27:07 ON THURSDAY:
    waitForText(new RegExpProperty(@".*LAST ACCESS AT \d\d:\d\d:\d\d ON .*DAY.*"), new Area(3, 1, 3, 80), 10000)

    Example 2:
    The following example uses the waitForText method to wait 5 seconds for a string, for example: "User":
    waitForText("User", new Area(3, 1, 3, 80), 5000)
    Waits for a specified text to appear on the emulator screen before continuing the run session.

    Example 1:
    The following example uses the waitForText method to wait 10 seconds for a string defined as regular expression, for example: CH70001 LAST ACCESS AT 14:27:07 ON THURSDAY:
    waitForText(new RegExpProperty(@".*LAST ACCESS AT \d\d:\d\d:\d\d ON .*DAY.*"), new Area(3, 1, 3, 80), 10000)

    Example 2:
    The following example uses the waitForText method to wait 5 seconds for a string, for example: "User":
    waitForText("User", new Area(3, 1, 3, 80), 5000)
    waitForText(StringProperty text, Area area, long milliseconds)
    Waits for a specified text to appear on the emulator screen before continuing the run session.
    Waits for a specified text to appear on the emulator screen before continuing the run session.
    Example: The following example uses the waitForText method to wait 5 seconds for a string, for example: "User":
    waitForText("User", new Area(3, 1, 3, 80), 5000)
    waitForText(String text, long milliseconds)
    Waits for a specified text to appear on the emulator screen before continuing the run session.
    waitForText(String text, Area area)
    Waits for a specified text to appear on the emulator screen before continuing the run session.
    Example: The following example uses the waitForText method to wait 5 seconds for a string, for example: "User":
    waitForText("User", new Area(3, 1, 3, 80), 5000)
    waitForText(String text, Area area, long milliseconds)
    Waits for a specified text to appear on the emulator screen before continuing the run session.
    Example: The following example uses the waitForText method to wait 5 seconds for a string, for example: "User":
    waitForText("User", new Area(3, 1, 3, 80), 5000)
  • Method Details

    • getSize

      Size getSize() throws GeneralLeanFtException
      Returns the Terminal Emulator screen column count and row count.
      Returns:
      Terminal Emulator screen column count and row count.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • getText

      String getText(Area area) throws GeneralLeanFtException
      Returns the Text from the specified screen rectangle.
      Parameters:
      area - The specified Area screen rectangle.
      Returns:
      Text from the specified screen rectangle.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • getText

      String getText() throws GeneralLeanFtException
      Returns the Text from the specified screen rectangle.
      Returns:
      Text from the specified screen rectangle.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • sync

      void sync(long milliseconds) throws GeneralLeanFtException
      Waits until a response is received from the host and the emulator.
      Parameters:
      milliseconds - The amount of time for which the emulator screen waits after a response.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • sync

      void sync() throws GeneralLeanFtException
      Waits until a response is received from the host and the emulator.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • waitForText

      Boolean waitForText(StringProperty text, Area area, long milliseconds) throws GeneralLeanFtException
      Waits for a specified text to appear on the emulator screen before continuing the run session.

      Example 1:
      The following example uses the waitForText method to wait 10 seconds for a string defined as regular expression, for example: CH70001 LAST ACCESS AT 14:27:07 ON THURSDAY:
      waitForText(new RegExpProperty(@".*LAST ACCESS AT \d\d:\d\d:\d\d ON .*DAY.*"), new Area(3, 1, 3, 80), 10000)

      Example 2:
      The following example uses the waitForText method to wait 5 seconds for a string, for example: "User":
      waitForText("User", new Area(3, 1, 3, 80), 5000)
      Parameters:
      text - The specified StringProperty for which the emulator screen is waiting. This parameter could be represented as string or regular expression.
      area - The specified Area where the specified text exists.
      milliseconds - The amount of time for which the emulator screen waits after a response.
      Returns:
      true if the text was found; otherwise false.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • waitForText

      Boolean waitForText(StringProperty text, Area area) throws GeneralLeanFtException
      Waits for a specified text to appear on the emulator screen before continuing the run session.

      Example 1:
      The following example uses the waitForText method to wait 10 seconds for a string defined as regular expression, for example: CH70001 LAST ACCESS AT 14:27:07 ON THURSDAY:
      waitForText(new RegExpProperty(@".*LAST ACCESS AT \d\d:\d\d:\d\d ON .*DAY.*"), new Area(3, 1, 3, 80), 10000)

      Example 2:
      The following example uses the waitForText method to wait 5 seconds for a string, for example: "User":
      waitForText("User", new Area(3, 1, 3, 80), 5000)
      Parameters:
      text - The specified StringProperty for which the emulator screen is waiting. This parameter could be represented as string or regular expression.
      area - The specified Area where the specified text exists.
      Returns:
      true if the text was found; otherwise false.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • waitForText

      Boolean waitForText(StringProperty text, long milliseconds) throws GeneralLeanFtException
      Waits for a specified text to appear on the emulator screen before continuing the run session.

      Example 1:
      The following example uses the waitForText method to wait 10 seconds for a string defined as regular expression, for example: CH70001 LAST ACCESS AT 14:27:07 ON THURSDAY:
      waitForText(new RegExpProperty(@".*LAST ACCESS AT \d\d:\d\d:\d\d ON .*DAY.*"), new Area(3, 1, 3, 80), 10000)

      Example 2:
      The following example uses the waitForText method to wait 5 seconds for a string, for example: "User":
      waitForText("User", new Area(3, 1, 3, 80), 5000)
      Parameters:
      text - The specified StringProperty for which the emulator screen is waiting. This parameter could be represented as string or regular expression.
      milliseconds - The amount of time for which the emulator screen waits after a response.
      Returns:
      true if the text was found; otherwise false.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • waitForText

      Boolean waitForText(StringProperty text) throws GeneralLeanFtException
      Waits for a specified text to appear on the emulator screen before continuing the run session.

      Example 1:
      The following example uses the waitForText method to wait 10 seconds for a string defined as regular expression, for example: CH70001 LAST ACCESS AT 14:27:07 ON THURSDAY:
      waitForText(new RegExpProperty(@".*LAST ACCESS AT \d\d:\d\d:\d\d ON .*DAY.*"), new Area(3, 1, 3, 80), 10000)

      Example 2:
      The following example uses the waitForText method to wait 5 seconds for a string, for example: "User":
      waitForText("User", new Area(3, 1, 3, 80), 5000)
      Parameters:
      text - The specified StringProperty for which the emulator screen is waiting. This parameter could be represented as string or regular expression.
      Returns:
      true if the text was found; otherwise false.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • waitForText

      Boolean waitForText(String text, Area area, long milliseconds) throws GeneralLeanFtException
      Waits for a specified text to appear on the emulator screen before continuing the run session.
      Example: The following example uses the waitForText method to wait 5 seconds for a string, for example: "User":
      waitForText("User", new Area(3, 1, 3, 80), 5000)
      Parameters:
      text - The specified String for which the emulator screen is waiting. This parameter could be represented as string.
      area - The specified Area where the specified text exists.
      milliseconds - The amount of time for which the emulator screen waits after a response.
      Returns:
      true if the text was found; otherwise false.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • waitForText

      Boolean waitForText(String text, Area area) throws GeneralLeanFtException
      Waits for a specified text to appear on the emulator screen before continuing the run session.
      Example: The following example uses the waitForText method to wait 5 seconds for a string, for example: "User":
      waitForText("User", new Area(3, 1, 3, 80), 5000)
      Parameters:
      text - The specified String for which the emulator screen is waiting.
      This parameter could be represented as string.
      area - The specified Area where the specified text exists.
      Returns:
      true if the text was found; otherwise false.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • waitForText

      Boolean waitForText(String text, long milliseconds) throws GeneralLeanFtException
      Waits for a specified text to appear on the emulator screen before continuing the run session. Example: The following example uses the waitForText method to wait 5 seconds for a string, for example: "User""
      waitForText("User", new Area(3, 1, 3, 80), 5000)
      Parameters:
      text - The specified String for which the emulator screen is waiting. This parameter could be represented as string.
      milliseconds - The amount of time for which the emulator screen waits after a response.
      Returns:
      true if the text was found; otherwise false.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • waitForText

      Boolean waitForText(String text) throws GeneralLeanFtException
      Waits for a specified text to appear on the emulator screen before continuing the run session.
      Example: The following example uses the waitForText method to wait 5 seconds for a string, for example: "User":
      waitForText("User", new Area(3, 1, 3, 80), 5000)
      Parameters:
      text - The specified String for which the emulator screen is waiting. This parameter could be represented as string.
      Returns:
      true if the text was found; otherwise false.
      Throws:
      GeneralLeanFtException - if error occurs during execution