Interface EggplantVirtualUserInterface

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List<ConnectionInfo> AllConnectionInfo()
      Get a list of information about all the current connections.
      void CaptureScreen​(java.lang.String name)
      Capture an area of screen and save to file.
      void CaptureScreen​(java.lang.String name, Rectangle rectangle, boolean increment, ImageInfo imageInfo)
      Capture an area of screen and save to file.
      void CaptureTextImage​(java.lang.String params)
      Capture text image.
      void Click​(int x, int y)
      Click on a point on the screen.
      void Click​(Point point)
      Click on a point on the screen.
      void Click​(java.lang.String image, java.lang.String... images)
      Clicks on an image.
      void CloseSuite​(java.lang.String suiteName)
      Close an eggPlant suite.
      Color ColorAtLocation​(int x, int y)
      Get the color at a location.
      Color ColorAtLocation​(Point location)
      Get the color at a location.
      void Connect​(ConnectionProperties connectionProperties)
      Connect to the SUT.
      void Connect​(java.lang.String name)
      Connect to the SUT.
      void Connect​(java.lang.String name, int portNum)
      Connect to the SUT.
      void Connect​(java.lang.String name, int portNum, ConnectionType type, java.lang.String username, java.lang.String password)
      Connect to the SUT.
      void Connect​(java.lang.String name, int portNum, java.lang.String username, java.lang.String password)
      Connect to the SUT.
      void Connect​(java.lang.String name, int portNum, java.lang.String username, java.lang.String password, java.lang.String sshHost, java.lang.String sshUser, java.lang.String sshPassword, int colorDepth)
      Connect to the SUT.
      void Connect​(java.lang.String name, int portNum, java.lang.String username, java.lang.String password, java.lang.String sshHost, java.lang.String sshUser, java.lang.String sshPassword, int colorDepth, ConnectionType type, int height, int width, java.lang.String[] additionalArgs)
      Connect to the SUT.
      void Connect​(java.lang.String name, ConnectionType type, java.lang.String username, java.lang.String password)
      Connect to the SUT.
      void Connect​(java.lang.String name, java.lang.String username, java.lang.String password)
      Connect to the SUT.
      ConnectionInfo ConnectionInfo​(java.lang.String name)
      Get connection info for a connection.
      void Disconnect()
      Disconnect from the SUT.
      void Disconnect​(java.lang.String name)
      Disconnect from the SUT.
      void DoubleClick​(int x, int y)
      Double click a point on the screen.
      void DoubleClick​(Point point)
      Double click a point on the screen.
      void DoubleClick​(java.lang.String image, java.lang.String... images)
      Double click on an image.
      void Drag​(int x, int y)
      Drag a point on the screen.
      void Drag​(Point point)
      Drag a point on the screen.
      void Drag​(java.lang.String image, java.lang.String... images)
      Drag an image.
      void DragAndDrop​(Point start, Point... subsequent)
      Drag and drop from one point to another.
      void DragAndDrop​(java.lang.String image1, java.lang.String image2, java.lang.String... subsequent)
      Drag and drop from one image to another.
      void Drop​(int x, int y)
      Drop a point on the screen.
      void Drop​(Point point)
      Drop a point on the screen.
      void Drop​(java.lang.String image, java.lang.String... images)
      Drop an image.
      java.util.HashMap EggPlantVersion()
      Get eggPlant version information Consult the Eggplant Functional documentation for details.
      void endEggplantSession()
      End the current eggPlant session.
      java.util.List<Point> EveryImageLocation​(java.lang.String image, java.lang.String... images)
      Get a list of image locations.
      java.util.List<Rectangle> EveryImageRectangle​(java.lang.String image, java.lang.String... images)
      Get a list of image rectangles.
      EggplantReturnData execute​(java.lang.String params)
      Execute some eggPlant script code on the SUT.
      ImageInfo FoundImageInfo()
      Get information about the last image we found.
      Point FoundImageLocation()
      Get the location of the last image we found.
      int FoundImageNumber()
      Get the number of the last image found.
      int getEggPlantDrivePort()
      Gets the port that eggPlant Drive is running on.
      java.lang.Object GetOption​(java.lang.String option)
      Gets the value of an option.
      java.lang.Object GetOptions()
      Gets the value of the global options.
      int getUpdatePollInterval()
      Get the time in seconds between updates from eggPlant Functional.
      Color ImageColorAtLocation​(java.lang.String image, int x, int y)
      Get the color of an image at a location.
      Color ImageColorAtLocation​(java.lang.String image, Point location)
      Get the color of an image at a location.
      boolean ImageFound​(int maxWaitTime, java.lang.String image, java.lang.String... images)
      Get whether or not we can find an image.
      boolean ImageFound​(java.lang.String image, java.lang.String... images)
      Get whether or not we can find an image.
      Point ImageHotSpot​(java.lang.String image)
      Get the hot spot location of an image Consult the Eggplant Functional documentation for details.
      java.util.List<ImageInfo> ImageInfo​(java.lang.String image, java.lang.String... images)
      Get image information for one or more images.
      Point ImageLocation​(java.lang.String image, java.lang.String... images)
      Get the location of an image.
      Rectangle ImageRectangle​(java.lang.String image, java.lang.String... images)
      Get the rectangle of an image.
      Size ImageSize​(java.lang.String image)
      Get the size of an image.
      boolean isVerbose()
      Whether or not verbose logging is turned on.
      void KeyDown​(java.lang.String key, java.lang.String... keys)
      Press one or more keys down.
      void KeyUp​(java.lang.String key, java.lang.String... keys)
      Release one or more keys.
      void Log​(java.lang.String text)
      Log a message Consult the Eggplant Functional documentation for details.
      void LogError​(java.lang.String text)
      Log an error.
      void LogWarning​(java.lang.String text)
      Log a warning.
      void MouseButtonDown​(int buttonNumber)
      Press a mouse button down.
      void MouseButtonUp​(int buttonNumber)
      Release a mouse button.
      Point MouseLocation()
      Gets the mouse location.
      void MoveTo​(int x, int y)
      Move to a point on the screen.
      void MoveTo​(Point point)
      Move to a point on the screen.
      void MoveTo​(java.lang.String image, java.lang.String... images)
      Move to an image location.
      void MoveToEach​(Point... points)
      Move to a number of points on the screen.
      void MoveToEach​(java.lang.String image, java.lang.String... images)
      Move to a number of image locations Consult the Eggplant Functional documentation for details.
      void OpenSuite​(java.lang.String suiteName)
      Open an eggPlant suite.
      java.util.List<java.lang.String> OpenSuites()
      Get a list of the open eggPlant suites.
      void PauseScript()
      Pause script.
      java.lang.Object ReadTable​(Rectangle rectangle, java.lang.String... params)
      Read table.
      java.lang.String ReadText​(int x, int y, java.lang.String... params)
      Read text at a point on the screen Consult the Eggplant Functional documentation for details.
      java.lang.String ReadText​(Point point, java.lang.String... params)
      Read text at a point on the screen Consult the Eggplant Functional documentation for details.
      java.lang.String ReadText​(Rectangle rectangle, java.lang.String... params)
      Read text from an area of the screen Consult the Eggplant Functional documentation for details.
      void RefreshScreen()
      Refresh the screen.
      java.lang.String RemoteClipboard()
      Get the contents of the remote clipboard.
      java.lang.String RemoteClipboard​(int maxWaitTime)
      Get the contents of the remote clipboard.
      void RightClick​(int x, int y)
      Right click a point on the screen.
      void RightClick​(Point point)
      Right click a point on the screen.
      void RightClick​(java.lang.String image, java.lang.String... images)
      Right click on an image.
      EggplantReturnData Run​(java.lang.String scriptName, java.lang.String... parameters)
      Run an eggPlant script.
      EggplantReturnData RunWithNewResults​(java.lang.String scriptName, java.lang.String... parameters)
      Run an eggPlant script with new results.
      java.util.List<ScriptResults> ScriptResults​(java.lang.String scriptName)
      Get the results of a script.
      void ScrollWheelDown​(int wheelIncrements)
      Scroll the mouse wheel down.
      void ScrollWheelUp​(int wheelIncrements)
      Scroll the mouse wheel up.
      void SendMail​(java.lang.String params)
      Send an email.
      void setEggPlantDrivePort​(int port)
      Sets the port that eggPlant Drive is running on.
      void SetOption​(java.lang.String params)
      Sets an option.
      void SetOptions​(java.lang.String param, java.lang.String... params)
      Sets the options.
      void SetRemoteClipboard​(java.lang.String text)
      Sets the text on the remote clipboard.
      void setUpdatePollInterval​(int updatePollInterval)
      Set the time in seconds between updates from eggPlant Functional.
      void setVerbose​(boolean verbose)
      Turns verbose logging on or off.
      void startEggplantSession()
      Start a new eggPlant session.
      void startEggplantSession​(java.lang.String suite)
      Start a new eggPlant session and open an eggPlant suite.
      void TypeText​(java.lang.String text)
      Type text.
      void TypeText​(java.lang.String text, java.lang.String... params)
      Type text.
      void Wait​(double time)
      Wait for a period of time.
      void WaitFor​(double time, java.lang.String image, java.lang.String... images)
      Wait for an image to appear.
      void WaitForAll​(double time, java.lang.String image, java.lang.String... images)
      Wait for multiple images to appear.
    • Method Detail

      • startEggplantSession

        void startEggplantSession()
                           throws java.lang.Exception
        Start a new eggPlant session. Only one session per EggplantVirtualUser can be active at any one time. You can end the current active session by calling endEggplantSession()
        Throws:
        java.lang.Exception - An error occurred
      • startEggplantSession

        void startEggplantSession​(java.lang.String suite)
                           throws java.lang.Exception
        Start a new eggPlant session and open an eggPlant suite. Only one session per EggplantVirtualUser can be active at any one time. You can end the current active session by calling endEggplantSession()
        Parameters:
        suite - the file path of the suite to open
        Throws:
        java.lang.Exception - An error occurred
      • endEggplantSession

        void endEggplantSession()
                         throws java.lang.Exception
        End the current eggPlant session. Only one session per EggplantVirtualUser can be active at any one time. You can start a new session by calling startEggplantSession()
        Throws:
        java.lang.Exception - An error occurred
      • execute

        EggplantReturnData execute​(java.lang.String params)
                            throws java.lang.Exception
        Execute some eggPlant script code on the SUT. The code can be any legal eggPlant script code. However, it is usually easier to use Run(String, String...) to execute a complete eggPlant script, rather than use this method.
        Parameters:
        params - the eggPlant script code to execute
        Returns:
        the eggPlant return data
        Throws:
        java.lang.Exception - An error occurred
      • isVerbose

        boolean isVerbose()
        Whether or not verbose logging is turned on.
        Returns:
        true, if verbose logging is turned on.
      • setVerbose

        void setVerbose​(boolean verbose)
        Turns verbose logging on or off.
        Parameters:
        verbose - true to turn verbose logging on, false to turn it off
      • getEggPlantDrivePort

        int getEggPlantDrivePort()
        Gets the port that eggPlant Drive is running on.
        Returns:
        the egg plant drive port
      • setEggPlantDrivePort

        void setEggPlantDrivePort​(int port)
        Sets the port that eggPlant Drive is running on.
        Parameters:
        port - the new egg plant drive port
      • Click

        void Click​(java.lang.String image,
                   java.lang.String... images)
            throws java.lang.Exception
        Clicks on an image. Consult the Eggplant Functional documentation for details.
        Parameters:
        image - the first image to try to click on
        images - the subsequent images
        Throws:
        java.lang.Exception - An error occurred
      • Click

        void Click​(Point point)
            throws java.lang.Exception
        Click on a point on the screen. Consult the Eggplant Functional documentation for details.
        Parameters:
        point - the point
        Throws:
        java.lang.Exception - An error occurred
      • Click

        void Click​(int x,
                   int y)
            throws java.lang.Exception
        Click on a point on the screen. Consult the Eggplant Functional documentation for details.
        Parameters:
        x - the x
        y - the y
        Throws:
        java.lang.Exception - An error occurred
      • DoubleClick

        void DoubleClick​(java.lang.String image,
                         java.lang.String... images)
                  throws java.lang.Exception
        Double click on an image. Consult the Eggplant Functional documentation for details.
        Parameters:
        image - the first image to try to click on
        images - the subsequent images
        Throws:
        java.lang.Exception - An error occurred
      • DoubleClick

        void DoubleClick​(Point point)
                  throws java.lang.Exception
        Double click a point on the screen. Consult the Eggplant Functional documentation for details.
        Parameters:
        point - the point to click
        Throws:
        java.lang.Exception - An error occurred
      • DoubleClick

        void DoubleClick​(int x,
                         int y)
                  throws java.lang.Exception
        Double click a point on the screen. Consult the Eggplant Functional documentation for details.
        Parameters:
        x - the x
        y - the y
        Throws:
        java.lang.Exception - An error occurred
      • RightClick

        void RightClick​(java.lang.String image,
                        java.lang.String... images)
                 throws java.lang.Exception
        Right click on an image. Consult the Eggplant Functional documentation for details.
        Parameters:
        image - the first image to try to click on
        images - the subsequent images
        Throws:
        java.lang.Exception - An error occurred
      • RightClick

        void RightClick​(Point point)
                 throws java.lang.Exception
        Right click a point on the screen. Consult the Eggplant Functional documentation for details.
        Parameters:
        point - the point to click
        Throws:
        java.lang.Exception - An error occurred
      • RightClick

        void RightClick​(int x,
                        int y)
                 throws java.lang.Exception
        Right click a point on the screen. Consult the Eggplant Functional documentation for details.
        Parameters:
        x - the x
        y - the y
        Throws:
        java.lang.Exception - An error occurred
      • MouseButtonDown

        void MouseButtonDown​(int buttonNumber)
                      throws java.lang.Exception
        Press a mouse button down. Consult the Eggplant Functional documentation for details.
        Parameters:
        buttonNumber - the mouse button number to press
        Throws:
        java.lang.Exception - An error occurred
      • MouseButtonUp

        void MouseButtonUp​(int buttonNumber)
                    throws java.lang.Exception
        Release a mouse button. Consult the Eggplant Functional documentation for details.
        Parameters:
        buttonNumber - the mouse button number to release
        Throws:
        java.lang.Exception - An error occurred
      • ScrollWheelDown

        void ScrollWheelDown​(int wheelIncrements)
                      throws java.lang.Exception
        Scroll the mouse wheel down. Consult the Eggplant Functional documentation for details.
        Parameters:
        wheelIncrements - the number of wheel increments to scroll
        Throws:
        java.lang.Exception - An error occurred
      • ScrollWheelUp

        void ScrollWheelUp​(int wheelIncrements)
                    throws java.lang.Exception
        Scroll the mouse wheel up. Consult the Eggplant Functional documentation for details.
        Parameters:
        wheelIncrements - the number of wheel increments to scroll
        Throws:
        java.lang.Exception - An error occurred
      • MoveTo

        void MoveTo​(java.lang.String image,
                    java.lang.String... images)
             throws java.lang.Exception
        Move to an image location. Consult the Eggplant Functional documentation for details.
        Parameters:
        image - the first image to try to move to
        images - subsequent images
        Throws:
        java.lang.Exception - An error occurred
      • MoveTo

        void MoveTo​(Point point)
             throws java.lang.Exception
        Move to a point on the screen. Consult the Eggplant Functional documentation for details.
        Parameters:
        point - the point to move to
        Throws:
        java.lang.Exception - An error occurred
      • MoveTo

        void MoveTo​(int x,
                    int y)
             throws java.lang.Exception
        Move to a point on the screen. Consult the Eggplant Functional documentation for details.
        Parameters:
        x - the x
        y - the y
        Throws:
        java.lang.Exception - An error occurred
      • MoveToEach

        void MoveToEach​(java.lang.String image,
                        java.lang.String... images)
                 throws java.lang.Exception
        Move to a number of image locations Consult the Eggplant Functional documentation for details.
        Parameters:
        image - the first image to move to
        images - subsequent images
        Throws:
        java.lang.Exception - An error occurred
      • MoveToEach

        void MoveToEach​(Point... points)
                 throws java.lang.Exception
        Move to a number of points on the screen. Consult the Eggplant Functional documentation for details.
        Parameters:
        points - the points to move to
        Throws:
        java.lang.Exception - An error occurred
      • Drag

        void Drag​(java.lang.String image,
                  java.lang.String... images)
           throws java.lang.Exception
        Drag an image. Consult the Eggplant Functional documentation for details.
        Parameters:
        image - the first image to try and drag
        images - subsequent images
        Throws:
        java.lang.Exception - An error occurred
      • Drag

        void Drag​(Point point)
           throws java.lang.Exception
        Drag a point on the screen. Consult the Eggplant Functional documentation for details.
        Parameters:
        point - the point to drag
        Throws:
        java.lang.Exception - An error occurred
      • Drag

        void Drag​(int x,
                  int y)
           throws java.lang.Exception
        Drag a point on the screen. Consult the Eggplant Functional documentation for details.
        Parameters:
        x - the x
        y - the y
        Throws:
        java.lang.Exception - An error occurred
      • Drop

        void Drop​(java.lang.String image,
                  java.lang.String... images)
           throws java.lang.Exception
        Drop an image. Consult the Eggplant Functional documentation for details.
        Parameters:
        image - the first image to try to find
        images - subsequent images
        Throws:
        java.lang.Exception - An error occurred
      • Drop

        void Drop​(Point point)
           throws java.lang.Exception
        Drop a point on the screen. Consult the Eggplant Functional documentation for details.
        Parameters:
        point - the point to drop
        Throws:
        java.lang.Exception - An error occurred
      • Drop

        void Drop​(int x,
                  int y)
           throws java.lang.Exception
        Drop a point on the screen. Consult the Eggplant Functional documentation for details.
        Parameters:
        x - the x
        y - the y
        Throws:
        java.lang.Exception - An error occurred
      • DragAndDrop

        void DragAndDrop​(java.lang.String image1,
                         java.lang.String image2,
                         java.lang.String... subsequent)
                  throws java.lang.Exception
        Drag and drop from one image to another. Consult the Eggplant Functional documentation for details.
        Parameters:
        image1 - the first image
        image2 - the second image
        subsequent - any subsequent images
        Throws:
        java.lang.Exception - An error occurred
      • DragAndDrop

        void DragAndDrop​(Point start,
                         Point... subsequent)
                  throws java.lang.Exception
        Drag and drop from one point to another. Consult the Eggplant Functional documentation for details.
        Parameters:
        start - the start point
        subsequent - subsequent points
        Throws:
        java.lang.Exception - An error occurred
      • MouseLocation

        Point MouseLocation()
                     throws java.lang.Exception
        Gets the mouse location. Consult the Eggplant Functional documentation for details.
        Returns:
        the mouse location
        Throws:
        java.lang.Exception - An error occurred
      • KeyDown

        void KeyDown​(java.lang.String key,
                     java.lang.String... keys)
              throws java.lang.Exception
        Press one or more keys down. Consult the Eggplant Functional documentation for details.
        Parameters:
        key - the first key to press.
        keys - any subsequent keys
        Throws:
        java.lang.Exception - An error occurred
      • KeyUp

        void KeyUp​(java.lang.String key,
                   java.lang.String... keys)
            throws java.lang.Exception
        Release one or more keys. Consult the Eggplant Functional documentation for details.
        Parameters:
        key - the first key to release
        keys - any subsequent keys
        Throws:
        java.lang.Exception - An error occurred
      • ReadTable

        java.lang.Object ReadTable​(Rectangle rectangle,
                                   java.lang.String... params)
                            throws java.lang.Exception
        Read table. Consult the Eggplant Functional documentation for details.
        Parameters:
        rectangle - the rectangle
        params - the params
        Returns:
        the object
        Throws:
        java.lang.Exception - An error occurred
      • ReadText

        java.lang.String ReadText​(Point point,
                                  java.lang.String... params)
                           throws java.lang.Exception
        Read text at a point on the screen Consult the Eggplant Functional documentation for details.
        Parameters:
        point - the point
        params - the params
        Returns:
        the text
        Throws:
        java.lang.Exception - An error occurred
      • ReadText

        java.lang.String ReadText​(int x,
                                  int y,
                                  java.lang.String... params)
                           throws java.lang.Exception
        Read text at a point on the screen Consult the Eggplant Functional documentation for details.
        Parameters:
        x - the x
        y - the y
        params - the params
        Returns:
        the string
        Throws:
        java.lang.Exception - An error occurred
      • ReadText

        java.lang.String ReadText​(Rectangle rectangle,
                                  java.lang.String... params)
                           throws java.lang.Exception
        Read text from an area of the screen Consult the Eggplant Functional documentation for details.
        Parameters:
        rectangle - the rectangle
        params - the params
        Returns:
        the string
        Throws:
        java.lang.Exception - An error occurred
      • RemoteClipboard

        java.lang.String RemoteClipboard​(int maxWaitTime)
                                  throws java.lang.Exception
        Get the contents of the remote clipboard. Consult the Eggplant Functional documentation for details.
        Parameters:
        maxWaitTime - the max wait time
        Returns:
        the text on the clipboard
        Throws:
        java.lang.Exception - An error occurred
      • RemoteClipboard

        java.lang.String RemoteClipboard()
                                  throws java.lang.Exception
        Get the contents of the remote clipboard. Consult the Eggplant Functional documentation for details.
        Returns:
        the text on the clipboard
        Throws:
        java.lang.Exception - An error occurred
      • SetRemoteClipboard

        void SetRemoteClipboard​(java.lang.String text)
                         throws java.lang.Exception
        Sets the text on the remote clipboard. Consult the Eggplant Functional documentation for details.
        Parameters:
        text - the text to set
        Throws:
        java.lang.Exception - An error occurred
      • TypeText

        void TypeText​(java.lang.String text)
               throws java.lang.Exception
        Type text. Consult the Eggplant Functional documentation for details.
        Parameters:
        text - the text to type
        Throws:
        java.lang.Exception - An error occurred
      • TypeText

        void TypeText​(java.lang.String text,
                      java.lang.String... params)
               throws java.lang.Exception
        Type text. Consult the Eggplant Functional documentation for details.
        Parameters:
        text - the text to type
        params - the params
        Throws:
        java.lang.Exception - An error occurred
      • Wait

        void Wait​(double time)
           throws java.lang.Exception
        Wait for a period of time. Consult the Eggplant Functional documentation for details.
        Parameters:
        time - the time in seconds to wait
        Throws:
        java.lang.Exception - An error occurred
      • WaitFor

        void WaitFor​(double time,
                     java.lang.String image,
                     java.lang.String... images)
              throws java.lang.Exception
        Wait for an image to appear. Consult the Eggplant Functional documentation for details.
        Parameters:
        time - the time in seconds to wait
        image - the first image to wait for
        images - any subsequent images to wait for
        Throws:
        java.lang.Exception - An error occurred
      • WaitForAll

        void WaitForAll​(double time,
                        java.lang.String image,
                        java.lang.String... images)
                 throws java.lang.Exception
        Wait for multiple images to appear. Consult the Eggplant Functional documentation for details.
        Parameters:
        time - the time in seconds to wait
        image - the first image to wait for
        images - the subsequent images to wait for
        Throws:
        java.lang.Exception - An error occurred
      • RefreshScreen

        void RefreshScreen()
                    throws java.lang.Exception
        Refresh the screen. Consult the Eggplant Functional documentation for details.
        Throws:
        java.lang.Exception - An error occurred
      • ImageFound

        boolean ImageFound​(java.lang.String image,
                           java.lang.String... images)
                    throws java.lang.Exception
        Get whether or not we can find an image. Consult the Eggplant Functional documentation for details.
        Parameters:
        image - the first image to look for
        images - any subsequent images to look for
        Returns:
        true, if successful
        Throws:
        java.lang.Exception - An error occurred
      • ImageFound

        boolean ImageFound​(int maxWaitTime,
                           java.lang.String image,
                           java.lang.String... images)
                    throws java.lang.Exception
        Get whether or not we can find an image. Consult the Eggplant Functional documentation for details.
        Parameters:
        maxWaitTime - the max time in seconds to wait for the image
        image - the first image to look for
        images - any subsequent images to look for
        Returns:
        true, if successful
        Throws:
        java.lang.Exception - An error occurred
      • ImageLocation

        Point ImageLocation​(java.lang.String image,
                            java.lang.String... images)
                     throws java.lang.Exception
        Get the location of an image. Consult the Eggplant Functional documentation for details.
        Parameters:
        image - the first image to look for
        images - any subsequent images to look for
        Returns:
        the screen location
        Throws:
        java.lang.Exception - An error occurred
      • ImageRectangle

        Rectangle ImageRectangle​(java.lang.String image,
                                 java.lang.String... images)
                          throws java.lang.Exception
        Get the rectangle of an image. Consult the Eggplant Functional documentation for details.
        Parameters:
        image - the first image to look for
        images - any subsequent images to look for
        Returns:
        the rectangle
        Throws:
        java.lang.Exception - An error occurred
      • EveryImageLocation

        java.util.List<Point> EveryImageLocation​(java.lang.String image,
                                                 java.lang.String... images)
                                          throws java.lang.Exception
        Get a list of image locations. Consult the Eggplant Functional documentation for details.
        Parameters:
        image - the first image to look for
        images - subsequent images to look for
        Returns:
        the list of points where the images were found
        Throws:
        java.lang.Exception - An error occurred
      • EveryImageRectangle

        java.util.List<Rectangle> EveryImageRectangle​(java.lang.String image,
                                                      java.lang.String... images)
                                               throws java.lang.Exception
        Get a list of image rectangles. Consult the Eggplant Functional documentation for details.
        Parameters:
        image - the first image to look fro
        images - subsequent images to look for
        Returns:
        the list of rectangles where the images were found
        Throws:
        java.lang.Exception - An error occurred
      • ImageInfo

        java.util.List<ImageInfo> ImageInfo​(java.lang.String image,
                                            java.lang.String... images)
                                     throws java.lang.Exception
        Get image information for one or more images. Consult the Eggplant Functional documentation for details.
        Parameters:
        image - the first image
        images - any subsequent images
        Returns:
        the list of image information
        Throws:
        java.lang.Exception - An error occurred
      • ImageHotSpot

        Point ImageHotSpot​(java.lang.String image)
                    throws java.lang.Exception
        Get the hot spot location of an image Consult the Eggplant Functional documentation for details.
        Parameters:
        image - the image to look for
        Returns:
        the hot spot location
        Throws:
        java.lang.Exception - An error occurred
      • ImageSize

        Size ImageSize​(java.lang.String image)
                throws java.lang.Exception
        Get the size of an image. Consult the Eggplant Functional documentation for details.
        Parameters:
        image - the image to look for
        Returns:
        the size of the image
        Throws:
        java.lang.Exception - An error occurred
      • ImageColorAtLocation

        Color ImageColorAtLocation​(java.lang.String image,
                                   Point location)
                            throws java.lang.Exception
        Get the color of an image at a location. Consult the Eggplant Functional documentation for details.
        Parameters:
        image - the image to look for
        location - the location within the image
        Returns:
        the color of the image at the location
        Throws:
        java.lang.Exception - An error occurred
      • ImageColorAtLocation

        Color ImageColorAtLocation​(java.lang.String image,
                                   int x,
                                   int y)
                            throws java.lang.Exception
        Get the color of an image at a location. Consult the Eggplant Functional documentation for details.
        Parameters:
        image - the image to look for
        x - the x coordinate within the image
        y - the y coordinate within the image
        Returns:
        the color of the image at the location
        Throws:
        java.lang.Exception - An error occurred
      • FoundImageInfo

        ImageInfo FoundImageInfo()
                          throws java.lang.Exception
        Get information about the last image we found. Consult the Eggplant Functional documentation for details.
        Returns:
        the image info
        Throws:
        java.lang.Exception - An error occurred
      • FoundImageLocation

        Point FoundImageLocation()
                          throws java.lang.Exception
        Get the location of the last image we found. Consult the Eggplant Functional documentation for details.
        Returns:
        the location of the last image found
        Throws:
        java.lang.Exception - An error occurred
      • FoundImageNumber

        int FoundImageNumber()
                      throws java.lang.Exception
        Get the number of the last image found. Consult the Eggplant Functional documentation for details.
        Returns:
        the int
        Throws:
        java.lang.Exception - An error occurred
      • PauseScript

        void PauseScript()
                  throws java.lang.Exception
        Pause script. Consult the Eggplant Functional documentation for details.
        Throws:
        java.lang.Exception - An error occurred
      • Run

        EggplantReturnData Run​(java.lang.String scriptName,
                               java.lang.String... parameters)
                        throws java.lang.Exception
        Run an eggPlant script. Consult the Eggplant Functional documentation for details.
        Parameters:
        scriptName - the script name
        parameters - the parameters to pass to the script
        Returns:
        the data returned from eggPlant
        Throws:
        java.lang.Exception - An error occurred
      • RunWithNewResults

        EggplantReturnData RunWithNewResults​(java.lang.String scriptName,
                                             java.lang.String... parameters)
                                      throws java.lang.Exception
        Run an eggPlant script with new results. Consult the Eggplant Functional documentation for details.
        Parameters:
        scriptName - the script name
        parameters - the parameters to pass to the script
        Returns:
        the data returned from eggPlant
        Throws:
        java.lang.Exception - An error occurred
      • OpenSuite

        void OpenSuite​(java.lang.String suiteName)
                throws java.lang.Exception
        Open an eggPlant suite. Consult the Eggplant Functional documentation for details.
        Parameters:
        suiteName - the path of the suite to open
        Throws:
        java.lang.Exception - An error occurred
      • CloseSuite

        void CloseSuite​(java.lang.String suiteName)
                 throws java.lang.Exception
        Close an eggPlant suite. Consult the Eggplant Functional documentation for details.
        Parameters:
        suiteName - the suite name
        Throws:
        java.lang.Exception - An error occurred
      • OpenSuites

        java.util.List<java.lang.String> OpenSuites()
                                             throws java.lang.Exception
        Get a list of the open eggPlant suites. Consult the Eggplant Functional documentation for details.
        Returns:
        the list of open suites
        Throws:
        java.lang.Exception - An error occurred
      • SetOption

        void SetOption​(java.lang.String params)
                throws java.lang.Exception
        Sets an option. Consult the Eggplant Functional documentation for details.
        Parameters:
        params - the options you are setting
        Throws:
        java.lang.Exception - An error occurred
      • SetOptions

        void SetOptions​(java.lang.String param,
                        java.lang.String... params)
                 throws java.lang.Exception
        Sets the options. Consult the Eggplant Functional documentation for details.
        Parameters:
        param - the first option to set
        params - subsequent options to set
        Throws:
        java.lang.Exception - An error occurred
      • GetOption

        java.lang.Object GetOption​(java.lang.String option)
                            throws java.lang.Exception
        Gets the value of an option. Consult the Eggplant Functional documentation for details.
        Parameters:
        option - the option to get
        Returns:
        the option value
        Throws:
        java.lang.Exception - An error occurred
      • GetOptions

        java.lang.Object GetOptions()
                             throws java.lang.Exception
        Gets the value of the global options. Consult the Eggplant Functional documentation for details.
        Returns:
        the options values
        Throws:
        java.lang.Exception - An error occurred
      • CaptureScreen

        void CaptureScreen​(java.lang.String name,
                           Rectangle rectangle,
                           boolean increment,
                           ImageInfo imageInfo)
                    throws java.lang.Exception
        Capture an area of screen and save to file. Consult the Eggplant Functional documentation for details.
        Parameters:
        name - the filepath of the captured image
        rectangle - the area of screen to capture
        increment - if true, automatically append an incremented number to the image name
        imageInfo - additional image info
        Throws:
        java.lang.Exception - An error occurred
      • CaptureScreen

        void CaptureScreen​(java.lang.String name)
                    throws java.lang.Exception
        Capture an area of screen and save to file. Consult the Eggplant Functional documentation for details.
        Parameters:
        name - the filepath of the captured image
        Throws:
        java.lang.Exception - An error occurred
      • EggPlantVersion

        java.util.HashMap EggPlantVersion()
                                   throws java.lang.Exception
        Get eggPlant version information Consult the Eggplant Functional documentation for details.
        Returns:
        the hash map of version information
        Throws:
        java.lang.Exception - An error occurred
      • ColorAtLocation

        Color ColorAtLocation​(Point location)
                       throws java.lang.Exception
        Get the color at a location. Consult the Eggplant Functional documentation for details.
        Parameters:
        location - the location
        Returns:
        the color at the location
        Throws:
        java.lang.Exception - An error occurred
      • ColorAtLocation

        Color ColorAtLocation​(int x,
                              int y)
                       throws java.lang.Exception
        Get the color at a location. Consult the Eggplant Functional documentation for details.
        Parameters:
        x - the x
        y - the y
        Returns:
        the color at the location
        Throws:
        java.lang.Exception - An error occurred
      • Connect

        void Connect​(java.lang.String name,
                     int portNum,
                     java.lang.String username,
                     java.lang.String password,
                     java.lang.String sshHost,
                     java.lang.String sshUser,
                     java.lang.String sshPassword,
                     int colorDepth,
                     ConnectionType type,
                     int height,
                     int width,
                     java.lang.String[] additionalArgs)
              throws java.lang.Exception
        Connect to the SUT. Consult the Eggplant Functional documentation for details.
        Parameters:
        name - the name of the SUT
        portNum - the port num
        username - the username for the SUT
        password - the password for the SUT
        sshHost - the ssh host
        sshUser - the ssh user
        sshPassword - the ssh password
        colorDepth - the color depth
        type - the type of connection to open (VNC or RDP)
        height - For RDP connection types only, specifies the height of the Viewer window in pixels. (Default value: 768.)
        width - For RDP connection types only, specifies the width of the Viewer window in pixels. (Default value: 1024.)
        additionalArgs - For Android VNC connections only, provides the scale-screen NN option that allows you to specify a screen scaling ratio where NN is an integer for the scale factor. For example, scale-screen 2 scales down the screen size to 50% of its actual size.
        Throws:
        java.lang.Exception - An error occurred
      • Connect

        void Connect​(java.lang.String name,
                     ConnectionType type,
                     java.lang.String username,
                     java.lang.String password)
              throws java.lang.Exception
        Connect to the SUT. Consult the Eggplant Functional documentation for details.
        Parameters:
        name - the name of the SUT
        type - the type of connection to open (VNC or RDP)
        username - the username for the SUT
        password - the password for the SUT
        Throws:
        java.lang.Exception - An error occurred
      • Connect

        void Connect​(java.lang.String name,
                     int portNum,
                     ConnectionType type,
                     java.lang.String username,
                     java.lang.String password)
              throws java.lang.Exception
        Connect to the SUT. Consult the Eggplant Functional documentation for details.
        Parameters:
        name - the name of the SUT
        portNum - the port number used by the SUT
        type - the type of connection to open (VNC or RDP)
        username - the username for the SUT
        password - the password for the SUT
        Throws:
        java.lang.Exception - An error occurred
      • Connect

        void Connect​(java.lang.String name,
                     int portNum,
                     java.lang.String username,
                     java.lang.String password,
                     java.lang.String sshHost,
                     java.lang.String sshUser,
                     java.lang.String sshPassword,
                     int colorDepth)
              throws java.lang.Exception
        Connect to the SUT. Consult the Eggplant Functional documentation for details.
        Parameters:
        name - the name of the SUT
        portNum - the port num
        username - the username for the SUT
        password - the password for the SUT
        sshHost - the ssh host
        sshUser - the ssh user
        sshPassword - the ssh password
        colorDepth - the color depth
        Throws:
        java.lang.Exception - An error occurred
      • Connect

        void Connect​(java.lang.String name,
                     int portNum,
                     java.lang.String username,
                     java.lang.String password)
              throws java.lang.Exception
        Connect to the SUT. Consult the Eggplant Functional documentation for details.
        Parameters:
        name - the name of the SUT
        portNum - the port num
        username - the username for the VNC server
        password - the password for the VNC server
        Throws:
        java.lang.Exception - An error occurred
      • Connect

        void Connect​(java.lang.String name,
                     java.lang.String username,
                     java.lang.String password)
              throws java.lang.Exception
        Connect to the SUT. Consult the Eggplant Functional documentation for details.
        Parameters:
        name - the name of the SUT
        username - the username for the VNC server
        password - the password for the VNC server
        Throws:
        java.lang.Exception - An error occurred
      • Connect

        void Connect​(java.lang.String name,
                     int portNum)
              throws java.lang.Exception
        Connect to the SUT. Consult the Eggplant Functional documentation for details.
        Parameters:
        name - the name of the SUT
        portNum - the port num
        Throws:
        java.lang.Exception - An error occurred
      • Connect

        void Connect​(java.lang.String name)
              throws java.lang.Exception
        Connect to the SUT. Consult the Eggplant Functional documentation for details.
        Parameters:
        name - the name of the SUT
        Throws:
        java.lang.Exception - An error occurred
      • Connect

        void Connect​(ConnectionProperties connectionProperties)
              throws java.lang.Exception
        Connect to the SUT. Consult the Eggplant Functional documentation for details.
        Parameters:
        connectionProperties - the connection properties to use to connect
        Throws:
        java.lang.Exception - An error occurred
      • ConnectionInfo

        ConnectionInfo ConnectionInfo​(java.lang.String name)
                               throws java.lang.Exception
        Get connection info for a connection. Consult the Eggplant Functional documentation for details.
        Parameters:
        name - the name of the connection
        Returns:
        the connection info
        Throws:
        java.lang.Exception - An error occurred
      • Disconnect

        void Disconnect​(java.lang.String name)
                 throws java.lang.Exception
        Disconnect from the SUT. Consult the Eggplant Functional documentation for details.
        Parameters:
        name - the name of the SUT
        Throws:
        java.lang.Exception - An error occurred
      • Disconnect

        void Disconnect()
                 throws java.lang.Exception
        Disconnect from the SUT. Consult the Eggplant Functional documentation for details.
        Throws:
        java.lang.Exception - An error occurred
      • CaptureTextImage

        void CaptureTextImage​(java.lang.String params)
                       throws java.lang.Exception
        Capture text image.
        Parameters:
        params - the params
        Throws:
        java.lang.Exception - An error occurred
      • AllConnectionInfo

        java.util.List<ConnectionInfo> AllConnectionInfo()
                                                  throws java.lang.Exception
        Get a list of information about all the current connections. Consult the Eggplant Functional documentation for details.
        Returns:
        the list of connection information
        Throws:
        java.lang.Exception - An error occurred
      • SendMail

        void SendMail​(java.lang.String params)
               throws java.lang.Exception
        Send an email. Consult the Eggplant Functional documentation for details.
        Parameters:
        params - the params
        Throws:
        java.lang.Exception - An error occurred
      • Log

        void Log​(java.lang.String text)
          throws java.lang.Exception
        Log a message Consult the Eggplant Functional documentation for details.
        Parameters:
        text - the text
        Throws:
        java.lang.Exception - An error occurred
      • LogWarning

        void LogWarning​(java.lang.String text)
                 throws java.lang.Exception
        Log a warning. Consult the Eggplant Functional documentation for details.
        Parameters:
        text - the text
        Throws:
        java.lang.Exception - An error occurred
      • LogError

        void LogError​(java.lang.String text)
               throws java.lang.Exception
        Log an error. Consult the Eggplant Functional documentation for details.
        Parameters:
        text - the text
        Throws:
        java.lang.Exception - An error occurred
      • ScriptResults

        java.util.List<ScriptResults> ScriptResults​(java.lang.String scriptName)
                                             throws java.lang.Exception
        Get the results of a script. Consult the Eggplant Functional documentation for details.
        Parameters:
        scriptName - the script name
        Returns:
        the list of script results
        Throws:
        java.lang.Exception - An error occurred
      • getUpdatePollInterval

        int getUpdatePollInterval()
        Get the time in seconds between updates from eggPlant Functional.

        When we tell eggPlant Functional to execute a long-running command (such as running a script), it will return the results so far every getUpdatePollInterval() seconds.

        Returns:
        the time in seconds between updates from eggPlant Functional.
        See Also:
        setUpdatePollInterval(int)
      • setUpdatePollInterval

        void setUpdatePollInterval​(int updatePollInterval)
                            throws BadValueException
        Set the time in seconds between updates from eggPlant Functional.

        When we tell eggPlant Functional to execute a long-running command (such as running a script), it will return the results so far every getUpdatePollInterval() seconds.

        Parameters:
        updatePollInterval - the time in seconds between updates from eggPlant Functional.
        Throws:
        BadValueException - An error occurred
        See Also:
        getUpdatePollInterval()