Package com.facilita.fc.eggPlant
Interface EggplantVirtualUserInterface
-
- All Known Implementing Classes:
EggplantVirtualUser,EggplantVirtualUserScript
public interface EggplantVirtualUserInterfaceDescribes the methods that can be called in anEggplantVirtualUserScriptor customEggplantVirtualUser.
-
-
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.voidCaptureScreen(java.lang.String name)Capture an area of screen and save to file.voidCaptureScreen(java.lang.String name, Rectangle rectangle, boolean increment, ImageInfo imageInfo)Capture an area of screen and save to file.voidCaptureTextImage(java.lang.String params)Capture text image.voidClick(int x, int y)Click on a point on the screen.voidClick(Point point)Click on a point on the screen.voidClick(java.lang.String image, java.lang.String... images)Clicks on an image.voidCloseSuite(java.lang.String suiteName)Close an eggPlant suite.ColorColorAtLocation(int x, int y)Get the color at a location.ColorColorAtLocation(Point location)Get the color at a location.voidConnect(ConnectionProperties connectionProperties)Connect to the SUT.voidConnect(java.lang.String name)Connect to the SUT.voidConnect(java.lang.String name, int portNum)Connect to the SUT.voidConnect(java.lang.String name, int portNum, ConnectionType type, java.lang.String username, java.lang.String password)Connect to the SUT.voidConnect(java.lang.String name, int portNum, java.lang.String username, java.lang.String password)Connect to the SUT.voidConnect(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.voidConnect(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.voidConnect(java.lang.String name, ConnectionType type, java.lang.String username, java.lang.String password)Connect to the SUT.voidConnect(java.lang.String name, java.lang.String username, java.lang.String password)Connect to the SUT.ConnectionInfoConnectionInfo(java.lang.String name)Get connection info for a connection.voidDisconnect()Disconnect from the SUT.voidDisconnect(java.lang.String name)Disconnect from the SUT.voidDoubleClick(int x, int y)Double click a point on the screen.voidDoubleClick(Point point)Double click a point on the screen.voidDoubleClick(java.lang.String image, java.lang.String... images)Double click on an image.voidDrag(int x, int y)Drag a point on the screen.voidDrag(Point point)Drag a point on the screen.voidDrag(java.lang.String image, java.lang.String... images)Drag an image.voidDragAndDrop(Point start, Point... subsequent)Drag and drop from one point to another.voidDragAndDrop(java.lang.String image1, java.lang.String image2, java.lang.String... subsequent)Drag and drop from one image to another.voidDrop(int x, int y)Drop a point on the screen.voidDrop(Point point)Drop a point on the screen.voidDrop(java.lang.String image, java.lang.String... images)Drop an image.java.util.HashMapEggPlantVersion()Get eggPlant version information Consult the Eggplant Functional documentation for details.voidendEggplantSession()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.EggplantReturnDataexecute(java.lang.String params)Execute some eggPlant script code on the SUT.ImageInfoFoundImageInfo()Get information about the last image we found.PointFoundImageLocation()Get the location of the last image we found.intFoundImageNumber()Get the number of the last image found.intgetEggPlantDrivePort()Gets the port that eggPlant Drive is running on.java.lang.ObjectGetOption(java.lang.String option)Gets the value of an option.java.lang.ObjectGetOptions()Gets the value of the global options.intgetUpdatePollInterval()Get the time in seconds between updates from eggPlant Functional.ColorImageColorAtLocation(java.lang.String image, int x, int y)Get the color of an image at a location.ColorImageColorAtLocation(java.lang.String image, Point location)Get the color of an image at a location.booleanImageFound(int maxWaitTime, java.lang.String image, java.lang.String... images)Get whether or not we can find an image.booleanImageFound(java.lang.String image, java.lang.String... images)Get whether or not we can find an image.PointImageHotSpot(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.PointImageLocation(java.lang.String image, java.lang.String... images)Get the location of an image.RectangleImageRectangle(java.lang.String image, java.lang.String... images)Get the rectangle of an image.SizeImageSize(java.lang.String image)Get the size of an image.booleanisVerbose()Whether or not verbose logging is turned on.voidKeyDown(java.lang.String key, java.lang.String... keys)Press one or more keys down.voidKeyUp(java.lang.String key, java.lang.String... keys)Release one or more keys.voidLog(java.lang.String text)Log a message Consult the Eggplant Functional documentation for details.voidLogError(java.lang.String text)Log an error.voidLogWarning(java.lang.String text)Log a warning.voidMouseButtonDown(int buttonNumber)Press a mouse button down.voidMouseButtonUp(int buttonNumber)Release a mouse button.PointMouseLocation()Gets the mouse location.voidMoveTo(int x, int y)Move to a point on the screen.voidMoveTo(Point point)Move to a point on the screen.voidMoveTo(java.lang.String image, java.lang.String... images)Move to an image location.voidMoveToEach(Point... points)Move to a number of points on the screen.voidMoveToEach(java.lang.String image, java.lang.String... images)Move to a number of image locations Consult the Eggplant Functional documentation for details.voidOpenSuite(java.lang.String suiteName)Open an eggPlant suite.java.util.List<java.lang.String>OpenSuites()Get a list of the open eggPlant suites.voidPauseScript()Pause script.java.lang.ObjectReadTable(Rectangle rectangle, java.lang.String... params)Read table.java.lang.StringReadText(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.StringReadText(Point point, java.lang.String... params)Read text at a point on the screen Consult the Eggplant Functional documentation for details.java.lang.StringReadText(Rectangle rectangle, java.lang.String... params)Read text from an area of the screen Consult the Eggplant Functional documentation for details.voidRefreshScreen()Refresh the screen.java.lang.StringRemoteClipboard()Get the contents of the remote clipboard.java.lang.StringRemoteClipboard(int maxWaitTime)Get the contents of the remote clipboard.voidRightClick(int x, int y)Right click a point on the screen.voidRightClick(Point point)Right click a point on the screen.voidRightClick(java.lang.String image, java.lang.String... images)Right click on an image.EggplantReturnDataRun(java.lang.String scriptName, java.lang.String... parameters)Run an eggPlant script.EggplantReturnDataRunWithNewResults(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.voidScrollWheelDown(int wheelIncrements)Scroll the mouse wheel down.voidScrollWheelUp(int wheelIncrements)Scroll the mouse wheel up.voidSendMail(java.lang.String params)Send an email.voidsetEggPlantDrivePort(int port)Sets the port that eggPlant Drive is running on.voidSetOption(java.lang.String params)Sets an option.voidSetOptions(java.lang.String param, java.lang.String... params)Sets the options.voidSetRemoteClipboard(java.lang.String text)Sets the text on the remote clipboard.voidsetUpdatePollInterval(int updatePollInterval)Set the time in seconds between updates from eggPlant Functional.voidsetVerbose(boolean verbose)Turns verbose logging on or off.voidstartEggplantSession()Start a new eggPlant session.voidstartEggplantSession(java.lang.String suite)Start a new eggPlant session and open an eggPlant suite.voidTypeText(java.lang.String text)Type text.voidTypeText(java.lang.String text, java.lang.String... params)Type text.voidWait(double time)Wait for a period of time.voidWaitFor(double time, java.lang.String image, java.lang.String... images)Wait for an image to appear.voidWaitForAll(double time, java.lang.String image, java.lang.String... images)Wait for multiple images to appear.
-
-
-
Method Detail
-
startEggplantSession
void startEggplantSession() throws java.lang.ExceptionStart a new eggPlant session. Only one session perEggplantVirtualUsercan be active at any one time. You can end the current active session by callingendEggplantSession()- Throws:
java.lang.Exception- An error occurred
-
startEggplantSession
void startEggplantSession(java.lang.String suite) throws java.lang.ExceptionStart a new eggPlant session and open an eggPlant suite. Only one session perEggplantVirtualUsercan be active at any one time. You can end the current active session by callingendEggplantSession()- Parameters:
suite- the file path of the suite to open- Throws:
java.lang.Exception- An error occurred
-
endEggplantSession
void endEggplantSession() throws java.lang.ExceptionEnd the current eggPlant session. Only one session perEggplantVirtualUsercan be active at any one time. You can start a new session by callingstartEggplantSession()- 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 useRun(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.ExceptionClicks on an image. Consult the Eggplant Functional documentation for details.- Parameters:
image- the first image to try to click onimages- 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.ExceptionClick on a point on the screen. Consult the Eggplant Functional documentation for details.- Parameters:
x- the xy- the y- Throws:
java.lang.Exception- An error occurred
-
DoubleClick
void DoubleClick(java.lang.String image, java.lang.String... images) throws java.lang.ExceptionDouble click on an image. Consult the Eggplant Functional documentation for details.- Parameters:
image- the first image to try to click onimages- 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.ExceptionDouble click a point on the screen. Consult the Eggplant Functional documentation for details.- Parameters:
x- the xy- the y- Throws:
java.lang.Exception- An error occurred
-
RightClick
void RightClick(java.lang.String image, java.lang.String... images) throws java.lang.ExceptionRight click on an image. Consult the Eggplant Functional documentation for details.- Parameters:
image- the first image to try to click onimages- 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.ExceptionRight click a point on the screen. Consult the Eggplant Functional documentation for details.- Parameters:
x- the xy- the y- Throws:
java.lang.Exception- An error occurred
-
MouseButtonDown
void MouseButtonDown(int buttonNumber) throws java.lang.ExceptionPress 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.ExceptionRelease 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.ExceptionScroll 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.ExceptionScroll 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.ExceptionMove to an image location. Consult the Eggplant Functional documentation for details.- Parameters:
image- the first image to try to move toimages- 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.ExceptionMove to a point on the screen. Consult the Eggplant Functional documentation for details.- Parameters:
x- the xy- the y- Throws:
java.lang.Exception- An error occurred
-
MoveToEach
void MoveToEach(java.lang.String image, java.lang.String... images) throws java.lang.ExceptionMove to a number of image locations Consult the Eggplant Functional documentation for details.- Parameters:
image- the first image to move toimages- 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.ExceptionDrag an image. Consult the Eggplant Functional documentation for details.- Parameters:
image- the first image to try and dragimages- 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.ExceptionDrag a point on the screen. Consult the Eggplant Functional documentation for details.- Parameters:
x- the xy- the y- Throws:
java.lang.Exception- An error occurred
-
Drop
void Drop(java.lang.String image, java.lang.String... images) throws java.lang.ExceptionDrop an image. Consult the Eggplant Functional documentation for details.- Parameters:
image- the first image to try to findimages- 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.ExceptionDrop a point on the screen. Consult the Eggplant Functional documentation for details.- Parameters:
x- the xy- 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.ExceptionDrag and drop from one image to another. Consult the Eggplant Functional documentation for details.- Parameters:
image1- the first imageimage2- the second imagesubsequent- 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 pointsubsequent- 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.ExceptionPress 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.ExceptionRelease one or more keys. Consult the Eggplant Functional documentation for details.- Parameters:
key- the first key to releasekeys- 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 rectangleparams- 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 pointparams- 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.ExceptionRead text at a point on the screen Consult the Eggplant Functional documentation for details.- Parameters:
x- the xy- the yparams- 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 rectangleparams- the params- Returns:
- the string
- Throws:
java.lang.Exception- An error occurred
-
RemoteClipboard
java.lang.String RemoteClipboard(int maxWaitTime) throws java.lang.ExceptionGet 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.ExceptionGet 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.ExceptionSets 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.ExceptionType 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.ExceptionType text. Consult the Eggplant Functional documentation for details.- Parameters:
text- the text to typeparams- 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.ExceptionWait for an image to appear. Consult the Eggplant Functional documentation for details.- Parameters:
time- the time in seconds to waitimage- the first image to wait forimages- 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.ExceptionWait for multiple images to appear. Consult the Eggplant Functional documentation for details.- Parameters:
time- the time in seconds to waitimage- the first image to wait forimages- the subsequent images to wait for- Throws:
java.lang.Exception- An error occurred
-
RefreshScreen
void RefreshScreen() throws java.lang.ExceptionRefresh 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.ExceptionGet whether or not we can find an image. Consult the Eggplant Functional documentation for details.- Parameters:
image- the first image to look forimages- 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.ExceptionGet 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 imageimage- the first image to look forimages- 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 forimages- 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 forimages- 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 forimages- 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 froimages- 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 imageimages- 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 forlocation- 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 forx- the x coordinate within the imagey- 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.ExceptionGet 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.ExceptionPause 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 nameparameters- 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 nameparameters- 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.ExceptionOpen 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.ExceptionClose 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.ExceptionGet 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.ExceptionSets 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.ExceptionSets the options. Consult the Eggplant Functional documentation for details.- Parameters:
param- the first option to setparams- subsequent options to set- Throws:
java.lang.Exception- An error occurred
-
GetOption
java.lang.Object GetOption(java.lang.String option) throws java.lang.ExceptionGets 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.ExceptionGets 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.ExceptionCapture an area of screen and save to file. Consult the Eggplant Functional documentation for details.- Parameters:
name- the filepath of the captured imagerectangle- the area of screen to captureincrement- if true, automatically append an incremented number to the image nameimageInfo- additional image info- Throws:
java.lang.Exception- An error occurred
-
CaptureScreen
void CaptureScreen(java.lang.String name) throws java.lang.ExceptionCapture 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.ExceptionGet 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 xy- 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.ExceptionConnect to the SUT. Consult the Eggplant Functional documentation for details.- Parameters:
name- the name of the SUTportNum- the port numusername- the username for the SUTpassword- the password for the SUTsshHost- the ssh hostsshUser- the ssh usersshPassword- the ssh passwordcolorDepth- the color depthtype- 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.ExceptionConnect to the SUT. Consult the Eggplant Functional documentation for details.- Parameters:
name- the name of the SUTtype- the type of connection to open (VNC or RDP)username- the username for the SUTpassword- 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.ExceptionConnect to the SUT. Consult the Eggplant Functional documentation for details.- Parameters:
name- the name of the SUTportNum- the port number used by the SUTtype- the type of connection to open (VNC or RDP)username- the username for the SUTpassword- 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.ExceptionConnect to the SUT. Consult the Eggplant Functional documentation for details.- Parameters:
name- the name of the SUTportNum- the port numusername- the username for the SUTpassword- the password for the SUTsshHost- the ssh hostsshUser- the ssh usersshPassword- the ssh passwordcolorDepth- 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.ExceptionConnect to the SUT. Consult the Eggplant Functional documentation for details.- Parameters:
name- the name of the SUTportNum- the port numusername- the username for the VNC serverpassword- 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.ExceptionConnect to the SUT. Consult the Eggplant Functional documentation for details.- Parameters:
name- the name of the SUTusername- the username for the VNC serverpassword- 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.ExceptionConnect to the SUT. Consult the Eggplant Functional documentation for details.- Parameters:
name- the name of the SUTportNum- the port num- Throws:
java.lang.Exception- An error occurred
-
Connect
void Connect(java.lang.String name) throws java.lang.ExceptionConnect 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.ExceptionDisconnect 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.ExceptionDisconnect 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.ExceptionCapture 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.ExceptionSend 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.ExceptionLog 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.ExceptionLog 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 BadValueExceptionSet 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()
-
-