com.hp.lft.sdk.te

Interface ScreenBase

  • All Known Subinterfaces:
    Screen, TextScreen


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

      Modifier and TypeMethod and Description
      SizegetSize()
      Returns the Terminal Emulator screen column count and row count.
      java.lang.StringgetText()
      Returns the Text from the specified screen rectangle.
      java.lang.StringgetText(Area area)
      Returns the Text from the specified screen rectangle.
      voidsync()
      Waits until a response is received from the host and the emulator.
      voidsync(long milliseconds)
      Waits until a response is received from the host and the emulator.
      java.lang.BooleanwaitForText(java.lang.String text)
      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)
      java.lang.BooleanwaitForText(java.lang.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)
      java.lang.BooleanwaitForText(java.lang.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)
      java.lang.BooleanwaitForText(java.lang.String text, long milliseconds)
      Waits for a specified text to appear on the emulator screen before continuing the run session.
      java.lang.BooleanwaitForText(StringProperty text)
      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)
      java.lang.BooleanwaitForText(StringProperty text, Area area)
      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)
      java.lang.BooleanwaitForText(StringProperty text, Area area, long milliseconds)
      Waits for a specified text to appear on the emulator screen before continuing the run session.
      java.lang.BooleanwaitForText(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)
    • Method Detail

      • 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 an error occurs during execution.
      • getText

        java.lang.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 an error occurs during execution.
      • getText

        java.lang.String getText()
                          throws GeneralLeanFtException
        Returns the Text from the specified screen rectangle.
        Returns:
        Text from the specified screen rectangle.
        Throws:
        GeneralLeanFtException - if an 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 an error occurs during execution.
      • waitForText

        java.lang.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 an error occurs during execution.
      • waitForText

        java.lang.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 an error occurs during execution.
      • waitForText

        java.lang.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 an error occurs during execution.
      • waitForText

        java.lang.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 an error occurs during execution.
      • waitForText

        java.lang.Boolean waitForText(java.lang.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 an error occurs during execution.
      • waitForText

        java.lang.Boolean waitForText(java.lang.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 an error occurs during execution.
      • waitForText

        java.lang.Boolean waitForText(java.lang.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 an error occurs during execution.
      • waitForText

        java.lang.Boolean waitForText(java.lang.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 an error occurs during execution.