Class EggplantVirtualUserScript
- java.lang.Object
-
- com.facilita.fc.runtime.VirtualUserScript
-
- com.facilita.fc.eggPlant.EggplantVirtualUserScript
-
- All Implemented Interfaces:
EggplantVirtualUserInterface
,DataDictionary
public abstract class EggplantVirtualUserScript extends VirtualUserScript implements EggplantVirtualUserInterface
An eggPlant VirtualUserScript. Provides methods to send commands to eggPlant, using eggPlant Drive.
-
-
Field Summary
-
Fields inherited from class com.facilita.fc.runtime.VirtualUserScript
ct, isMainScript
-
-
Constructor Summary
Constructors Constructor Description EggplantVirtualUserScript()
-
Method Summary
All Methods Instance Methods Concrete 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 imageFileName)
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.EggplantVirtualUser
getVU()
Gets the current VU instance, as the most specialised subclass ofVirtualUser
.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.void
script()
This is the method which will be run by theVirtualUser
when it executes this script, and is where you should write your test script code.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 param, 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.-
Methods inherited from class com.facilita.fc.runtime.VirtualUserScript
acceptCancellation, add, checkIfCancellationRequested, clearProgressPoint, createBackgroundScript, createBackgroundScript, endRequest, endRequest, endTiming, endTiming, endTransaction, endTransaction, endTransaction, error, error, error, error, error, exitVU, exitVU, exitVU, fail, failTiming, failTransaction, failTransaction, finalSequence, finishIterating, finishIteratingRequested, flushEventLog, formatDateTime, formatDateTime, formatDateTime, formatDateTime, formatDateTime, formatDateTime, formatDateTime, formatDateTime, formatDateTime, formatDateTime, formatDateTime, formatDateTime, formatDateTime, formatDateTime, formatDateTime, formatDateTime, get, get, getBackgroundScriptID, getBackgroundScriptIDs, getBackgroundScriptStatus, getBoolean, getBoolean, getCurrentIteration, getCurrentTimeInXml, getCurrentTransaction, getDataDictionary, getDataDictionary, getDataPath, getDataTable, getDouble, getDouble, getElapsedTime, getFilesDataPath, getFloat, getFloat, getGroupSize, getGroupSize, getGroupSizes, getIndex, getInitialDelay, getInjectorFamilyName, getInjectorName, getInt, getInt, getInteger, getInteger, getIsStopped, getIteration, getIterationDelay, getIterationForTime, getLastError, getLastTransaction, getList, getList, getLong, getLong, getMap, getMaxFailures, getMillisecondsSinceEpoch, getMillisecondsSinceEpoch, getName, getNumberOfErrors, getNumberOfFailures, getNumberOfIterations, getNumberOfWarmupIterations, getNumberOfWarnings, getPauseFactor, getProgressPoint, getRunPath, getSandboxPath, getScriptName, getSecondsSinceEpoch, getSecondsSinceEpoch, getService, getString, getString, getTimingElapsedTime, getTransactionData, getTransactionElapsedTime, getTransactionElapsedTime, getTransactionLoggingOn, getUniqueID, getUniqueID, getVirtualUser, getVUName, hasKey, isFinalScript, isFirstScript, isInitialScript, isIteratedScript, isLastIteration, isPacing, isReadOnly, keys, lastIterationDelay, logCurrentDataValues, nextIteration, nextScript, nextSequence, onBackgroundScriptCancellation, pause, pause, pre, raiseAlert, recordMetric, recordMetrics, recordTransaction, recordTransaction, recordTransaction, recordTransaction, requestToStopBackgroundScript, resume, resumeBackgroundScript, resumeTransaction, resumeTransaction, selectRandomEntryFromList, set, setBackgroundScriptID, setBoolean, setCancellationToken, setDouble, setFloat, setInt, setInteger, setList, setLong, setName, setNumberOfWarmupIterations, setPauseFactor, setProgressPoint, setProgressPoint, setProgressPoint, setString, setSynchronizationPoint, setTransactionLoggingOn, startBackgroundScript, startRequest, startTiming, startTransaction, startTransaction, stopBackgroundScriptImmediately, stopImmediately, suspend, suspendBackgroundScript, suspendTransaction, suspendTransaction, timeToPause, toString, tryToSuspend, unsetSynchronizationPoint, verify, verifyEQ, verifyEQ, verifyEQ, verifyEQ, verifyLE, verifyLE, verifyLE, verifyLE, verifyLT, verifyLT, verifyLT, verifyLT, waitFor, waitForBackgroundScriptToFinish, waitForBoolean, waitForDouble, waitForFloat, waitForInt, waitForList, waitForLong, waitForString, waitForSynchronizationPoint, warn, warn, warn, warn, whereAmI, writeMessage, writeMessage, writeMessage, writeMessage, writeSystemLog, writeSystemLog
-
-
-
-
Method Detail
-
script
public void script() throws java.lang.Exception
Description copied from class:VirtualUserScript
This is the method which will be run by theVirtualUser
when it executes this script, and is where you should write your test script code.This is an
abstract
method and must be overridden in subclasses ofVirtualUserScript
. In scripts created using eggPlant Performance Studio, a blankscript()
method is automatically added.If this script is assigned to a Virtual User group in a test, or is part of a workflow that is assigned to a Virtual User group in a test, then the script will be executed when the test is run.
If this Virtual User (along with any others in the group) is assigned a single script, then the
script()
method of the VirtualUserScript object is called once per iteration.If this Virtual User (along with any others in the group) is assigned a workflow, then the point at which the
script()
method is called depends on which section of the workflow the script is in.- initial sequence of scripts: the
script()
method of eachVirtualUserScript
object is called once at the beginning of the test, in the order in which the scripts appear in the sequence. - repeated sequence of scripts: the
script()
method of eachVirtualUserScript
object is called once per iteration, in the order in which the scripts appear in the sequence. - final sequence of scripts: the
script()
method of eachVirtualUserScript
object is called once at the end of the test, in the order in which the scripts appear in the sequence.
- Specified by:
script
in classVirtualUserScript
- Throws:
java.lang.Exception
- An error occurred
- initial sequence of scripts: the
-
Click
public void Click(int x, int y) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Click on a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
Click
in interfaceEggplantVirtualUserInterface
- Parameters:
x
- the xy
- the y- Throws:
java.lang.Exception
- An error occurred
-
DoubleClick
public void DoubleClick(int x, int y) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Double click a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
DoubleClick
in interfaceEggplantVirtualUserInterface
- Parameters:
x
- the xy
- the y- Throws:
java.lang.Exception
- An error occurred
-
RightClick
public void RightClick(int x, int y) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Right click a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
RightClick
in interfaceEggplantVirtualUserInterface
- Parameters:
x
- the xy
- the y- Throws:
java.lang.Exception
- An error occurred
-
MoveTo
public void MoveTo(int x, int y) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Move to a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
MoveTo
in interfaceEggplantVirtualUserInterface
- Parameters:
x
- the xy
- the y- Throws:
java.lang.Exception
- An error occurred
-
Drag
public void Drag(int x, int y) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Drag a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
Drag
in interfaceEggplantVirtualUserInterface
- Parameters:
x
- the xy
- the y- Throws:
java.lang.Exception
- An error occurred
-
Drop
public void Drop(int x, int y) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Drop a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
Drop
in interfaceEggplantVirtualUserInterface
- Parameters:
x
- the xy
- the y- Throws:
java.lang.Exception
- An error occurred
-
ReadText
public java.lang.String ReadText(int x, int y, java.lang.String... params) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Read text at a point on the screen Consult the Eggplant Functional documentation for details.- Specified by:
ReadText
in interfaceEggplantVirtualUserInterface
- Parameters:
x
- the xy
- the yparams
- the params- Returns:
- the string
- Throws:
java.lang.Exception
- An error occurred
-
ImageColorAtLocation
public Color ImageColorAtLocation(java.lang.String image, int x, int y) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get the color of an image at a location. Consult the Eggplant Functional documentation for details.- Specified by:
ImageColorAtLocation
in interfaceEggplantVirtualUserInterface
- 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
-
ColorAtLocation
public Color ColorAtLocation(int x, int y) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get the color at a location. Consult the Eggplant Functional documentation for details.- Specified by:
ColorAtLocation
in interfaceEggplantVirtualUserInterface
- Parameters:
x
- the xy
- the y- Returns:
- the color at the location
- Throws:
java.lang.Exception
- An error occurred
-
Click
public void Click(java.lang.String image, java.lang.String... images) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Clicks on an image. Consult the Eggplant Functional documentation for details.- Specified by:
Click
in interfaceEggplantVirtualUserInterface
- Parameters:
image
- the first image to try to click onimages
- the subsequent images- Throws:
java.lang.Exception
- An error occurred
-
Click
public void Click(Point point) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Click on a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
Click
in interfaceEggplantVirtualUserInterface
- Parameters:
point
- the point- Throws:
java.lang.Exception
- An error occurred
-
DoubleClick
public void DoubleClick(java.lang.String image, java.lang.String... images) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Double click on an image. Consult the Eggplant Functional documentation for details.- Specified by:
DoubleClick
in interfaceEggplantVirtualUserInterface
- Parameters:
image
- the first image to try to click onimages
- the subsequent images- Throws:
java.lang.Exception
- An error occurred
-
DoubleClick
public void DoubleClick(Point point) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Double click a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
DoubleClick
in interfaceEggplantVirtualUserInterface
- Parameters:
point
- the point to click- Throws:
java.lang.Exception
- An error occurred
-
RightClick
public void RightClick(java.lang.String image, java.lang.String... images) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Right click on an image. Consult the Eggplant Functional documentation for details.- Specified by:
RightClick
in interfaceEggplantVirtualUserInterface
- Parameters:
image
- the first image to try to click onimages
- the subsequent images- Throws:
java.lang.Exception
- An error occurred
-
RightClick
public void RightClick(Point point) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Right click a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
RightClick
in interfaceEggplantVirtualUserInterface
- Parameters:
point
- the point to click- Throws:
java.lang.Exception
- An error occurred
-
MouseButtonDown
public void MouseButtonDown(int buttonNumber) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Press a mouse button down. Consult the Eggplant Functional documentation for details.- Specified by:
MouseButtonDown
in interfaceEggplantVirtualUserInterface
- Parameters:
buttonNumber
- the mouse button number to press- Throws:
java.lang.Exception
- An error occurred
-
MouseButtonUp
public void MouseButtonUp(int buttonNumber) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Release a mouse button. Consult the Eggplant Functional documentation for details.- Specified by:
MouseButtonUp
in interfaceEggplantVirtualUserInterface
- Parameters:
buttonNumber
- the mouse button number to release- Throws:
java.lang.Exception
- An error occurred
-
ScrollWheelDown
public void ScrollWheelDown(int wheelIncrements) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Scroll the mouse wheel down. Consult the Eggplant Functional documentation for details.- Specified by:
ScrollWheelDown
in interfaceEggplantVirtualUserInterface
- Parameters:
wheelIncrements
- the number of wheel increments to scroll- Throws:
java.lang.Exception
- An error occurred
-
ScrollWheelUp
public void ScrollWheelUp(int wheelIncrements) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Scroll the mouse wheel up. Consult the Eggplant Functional documentation for details.- Specified by:
ScrollWheelUp
in interfaceEggplantVirtualUserInterface
- Parameters:
wheelIncrements
- the number of wheel increments to scroll- Throws:
java.lang.Exception
- An error occurred
-
MoveTo
public void MoveTo(java.lang.String image, java.lang.String... images) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Move to an image location. Consult the Eggplant Functional documentation for details.- Specified by:
MoveTo
in interfaceEggplantVirtualUserInterface
- Parameters:
image
- the first image to try to move toimages
- subsequent images- Throws:
java.lang.Exception
- An error occurred
-
MoveTo
public void MoveTo(Point point) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Move to a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
MoveTo
in interfaceEggplantVirtualUserInterface
- Parameters:
point
- the point to move to- Throws:
java.lang.Exception
- An error occurred
-
MoveToEach
public void MoveToEach(java.lang.String image, java.lang.String... images) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Move to a number of image locations Consult the Eggplant Functional documentation for details.- Specified by:
MoveToEach
in interfaceEggplantVirtualUserInterface
- Parameters:
image
- the first image to move toimages
- subsequent images- Throws:
java.lang.Exception
- An error occurred
-
MoveToEach
public void MoveToEach(Point... points) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Move to a number of points on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
MoveToEach
in interfaceEggplantVirtualUserInterface
- Parameters:
points
- the points to move to- Throws:
java.lang.Exception
- An error occurred
-
Drag
public void Drag(java.lang.String image, java.lang.String... images) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Drag an image. Consult the Eggplant Functional documentation for details.- Specified by:
Drag
in interfaceEggplantVirtualUserInterface
- Parameters:
image
- the first image to try and dragimages
- subsequent images- Throws:
java.lang.Exception
- An error occurred
-
Drag
public void Drag(Point point) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Drag a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
Drag
in interfaceEggplantVirtualUserInterface
- Parameters:
point
- the point to drag- Throws:
java.lang.Exception
- An error occurred
-
Drop
public void Drop(java.lang.String image, java.lang.String... images) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Drop an image. Consult the Eggplant Functional documentation for details.- Specified by:
Drop
in interfaceEggplantVirtualUserInterface
- Parameters:
image
- the first image to try to findimages
- subsequent images- Throws:
java.lang.Exception
- An error occurred
-
Drop
public void Drop(Point point) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Drop a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
Drop
in interfaceEggplantVirtualUserInterface
- Parameters:
point
- the point to drop- Throws:
java.lang.Exception
- An error occurred
-
DragAndDrop
public void DragAndDrop(java.lang.String image1, java.lang.String image2, java.lang.String... subsequent) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Drag and drop from one image to another. Consult the Eggplant Functional documentation for details.- Specified by:
DragAndDrop
in interfaceEggplantVirtualUserInterface
- Parameters:
image1
- the first imageimage2
- the second imagesubsequent
- any subsequent images- Throws:
java.lang.Exception
- An error occurred
-
DragAndDrop
public void DragAndDrop(Point start, Point... subsequent) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Drag and drop from one point to another. Consult the Eggplant Functional documentation for details.- Specified by:
DragAndDrop
in interfaceEggplantVirtualUserInterface
- Parameters:
start
- the start pointsubsequent
- subsequent points- Throws:
java.lang.Exception
- An error occurred
-
MouseLocation
public Point MouseLocation() throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Gets the mouse location. Consult the Eggplant Functional documentation for details.- Specified by:
MouseLocation
in interfaceEggplantVirtualUserInterface
- Returns:
- the mouse location
- Throws:
java.lang.Exception
- An error occurred
-
KeyDown
public void KeyDown(java.lang.String key, java.lang.String... keys) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Press one or more keys down. Consult the Eggplant Functional documentation for details.- Specified by:
KeyDown
in interfaceEggplantVirtualUserInterface
- Parameters:
key
- the first key to press.keys
- any subsequent keys- Throws:
java.lang.Exception
- An error occurred
-
KeyUp
public void KeyUp(java.lang.String key, java.lang.String... keys) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Release one or more keys. Consult the Eggplant Functional documentation for details.- Specified by:
KeyUp
in interfaceEggplantVirtualUserInterface
- Parameters:
key
- the first key to releasekeys
- any subsequent keys- Throws:
java.lang.Exception
- An error occurred
-
ReadTable
public java.lang.Object ReadTable(Rectangle rectangle, java.lang.String... params) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Read table. Consult the Eggplant Functional documentation for details.- Specified by:
ReadTable
in interfaceEggplantVirtualUserInterface
- Parameters:
rectangle
- the rectangleparams
- the params- Returns:
- the object
- Throws:
java.lang.Exception
- An error occurred
-
ReadText
public java.lang.String ReadText(Point point, java.lang.String... params) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Read text at a point on the screen Consult the Eggplant Functional documentation for details.- Specified by:
ReadText
in interfaceEggplantVirtualUserInterface
- Parameters:
point
- the pointparams
- the params- Returns:
- the text
- Throws:
java.lang.Exception
- An error occurred
-
ReadText
public java.lang.String ReadText(Rectangle rectangle, java.lang.String... params) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Read text from an area of the screen Consult the Eggplant Functional documentation for details.- Specified by:
ReadText
in interfaceEggplantVirtualUserInterface
- Parameters:
rectangle
- the rectangleparams
- the params- Returns:
- the string
- Throws:
java.lang.Exception
- An error occurred
-
RemoteClipboard
public java.lang.String RemoteClipboard(int maxWaitTime) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get the contents of the remote clipboard. Consult the Eggplant Functional documentation for details.- Specified by:
RemoteClipboard
in interfaceEggplantVirtualUserInterface
- Parameters:
maxWaitTime
- the max wait time- Returns:
- the text on the clipboard
- Throws:
java.lang.Exception
- An error occurred
-
RemoteClipboard
public java.lang.String RemoteClipboard() throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get the contents of the remote clipboard. Consult the Eggplant Functional documentation for details.- Specified by:
RemoteClipboard
in interfaceEggplantVirtualUserInterface
- Returns:
- the text on the clipboard
- Throws:
java.lang.Exception
- An error occurred
-
SetRemoteClipboard
public void SetRemoteClipboard(java.lang.String text) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Sets the text on the remote clipboard. Consult the Eggplant Functional documentation for details.- Specified by:
SetRemoteClipboard
in interfaceEggplantVirtualUserInterface
- Parameters:
text
- the text to set- Throws:
java.lang.Exception
- An error occurred
-
TypeText
public void TypeText(java.lang.String param, java.lang.String... params) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Type text. Consult the Eggplant Functional documentation for details.- Specified by:
TypeText
in interfaceEggplantVirtualUserInterface
- Parameters:
param
- the text to typeparams
- the params- Throws:
java.lang.Exception
- An error occurred
-
TypeText
public void TypeText(java.lang.String text) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Type text. Consult the Eggplant Functional documentation for details.- Specified by:
TypeText
in interfaceEggplantVirtualUserInterface
- Parameters:
text
- the text to type- Throws:
java.lang.Exception
- An error occurred
-
Wait
public void Wait(double time) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Wait for a period of time. Consult the Eggplant Functional documentation for details.- Specified by:
Wait
in interfaceEggplantVirtualUserInterface
- Parameters:
time
- the time in seconds to wait- Throws:
java.lang.Exception
- An error occurred
-
WaitFor
public void WaitFor(double time, java.lang.String image, java.lang.String... images) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Wait for an image to appear. Consult the Eggplant Functional documentation for details.- Specified by:
WaitFor
in interfaceEggplantVirtualUserInterface
- 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
public void WaitForAll(double time, java.lang.String image, java.lang.String... images) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Wait for multiple images to appear. Consult the Eggplant Functional documentation for details.- Specified by:
WaitForAll
in interfaceEggplantVirtualUserInterface
- 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
public void RefreshScreen() throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Refresh the screen. Consult the Eggplant Functional documentation for details.- Specified by:
RefreshScreen
in interfaceEggplantVirtualUserInterface
- Throws:
java.lang.Exception
- An error occurred
-
ImageFound
public boolean ImageFound(java.lang.String image, java.lang.String... images) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get whether or not we can find an image. Consult the Eggplant Functional documentation for details.- Specified by:
ImageFound
in interfaceEggplantVirtualUserInterface
- 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
public boolean ImageFound(int maxWaitTime, java.lang.String image, java.lang.String... images) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get whether or not we can find an image. Consult the Eggplant Functional documentation for details.- Specified by:
ImageFound
in interfaceEggplantVirtualUserInterface
- 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
public Point ImageLocation(java.lang.String image, java.lang.String... images) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get the location of an image. Consult the Eggplant Functional documentation for details.- Specified by:
ImageLocation
in interfaceEggplantVirtualUserInterface
- 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
public Rectangle ImageRectangle(java.lang.String image, java.lang.String... images) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get the rectangle of an image. Consult the Eggplant Functional documentation for details.- Specified by:
ImageRectangle
in interfaceEggplantVirtualUserInterface
- 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
public java.util.List<Point> EveryImageLocation(java.lang.String image, java.lang.String... images) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get a list of image locations. Consult the Eggplant Functional documentation for details.- Specified by:
EveryImageLocation
in interfaceEggplantVirtualUserInterface
- 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
public java.util.List<Rectangle> EveryImageRectangle(java.lang.String image, java.lang.String... images) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get a list of image rectangles. Consult the Eggplant Functional documentation for details.- Specified by:
EveryImageRectangle
in interfaceEggplantVirtualUserInterface
- 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
public java.util.List<ImageInfo> ImageInfo(java.lang.String image, java.lang.String... images) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get image information for one or more images. Consult the Eggplant Functional documentation for details.- Specified by:
ImageInfo
in interfaceEggplantVirtualUserInterface
- Parameters:
image
- the first imageimages
- any subsequent images- Returns:
- the list of image information
- Throws:
java.lang.Exception
- An error occurred
-
ImageHotSpot
public Point ImageHotSpot(java.lang.String image) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get the hot spot location of an image Consult the Eggplant Functional documentation for details.- Specified by:
ImageHotSpot
in interfaceEggplantVirtualUserInterface
- Parameters:
image
- the image to look for- Returns:
- the hot spot location
- Throws:
java.lang.Exception
- An error occurred
-
ImageSize
public Size ImageSize(java.lang.String image) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get the size of an image. Consult the Eggplant Functional documentation for details.- Specified by:
ImageSize
in interfaceEggplantVirtualUserInterface
- Parameters:
image
- the image to look for- Returns:
- the size of the image
- Throws:
java.lang.Exception
- An error occurred
-
ImageColorAtLocation
public Color ImageColorAtLocation(java.lang.String image, Point location) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get the color of an image at a location. Consult the Eggplant Functional documentation for details.- Specified by:
ImageColorAtLocation
in interfaceEggplantVirtualUserInterface
- 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
-
FoundImageInfo
public ImageInfo FoundImageInfo() throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get information about the last image we found. Consult the Eggplant Functional documentation for details.- Specified by:
FoundImageInfo
in interfaceEggplantVirtualUserInterface
- Returns:
- the image info
- Throws:
java.lang.Exception
- An error occurred
-
FoundImageLocation
public Point FoundImageLocation() throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get the location of the last image we found. Consult the Eggplant Functional documentation for details.- Specified by:
FoundImageLocation
in interfaceEggplantVirtualUserInterface
- Returns:
- the location of the last image found
- Throws:
java.lang.Exception
- An error occurred
-
FoundImageNumber
public int FoundImageNumber() throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get the number of the last image found. Consult the Eggplant Functional documentation for details.- Specified by:
FoundImageNumber
in interfaceEggplantVirtualUserInterface
- Returns:
- the int
- Throws:
java.lang.Exception
- An error occurred
-
PauseScript
public void PauseScript() throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Pause script. Consult the Eggplant Functional documentation for details.- Specified by:
PauseScript
in interfaceEggplantVirtualUserInterface
- Throws:
java.lang.Exception
- An error occurred
-
Run
public EggplantReturnData Run(java.lang.String scriptName, java.lang.String... parameters) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Run an eggPlant script. Consult the Eggplant Functional documentation for details.- Specified by:
Run
in interfaceEggplantVirtualUserInterface
- 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
public EggplantReturnData RunWithNewResults(java.lang.String scriptName, java.lang.String... parameters) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Run an eggPlant script with new results. Consult the Eggplant Functional documentation for details.- Specified by:
RunWithNewResults
in interfaceEggplantVirtualUserInterface
- 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
public void OpenSuite(java.lang.String suiteName) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Open an eggPlant suite. Consult the Eggplant Functional documentation for details.- Specified by:
OpenSuite
in interfaceEggplantVirtualUserInterface
- Parameters:
suiteName
- the path of the suite to open- Throws:
java.lang.Exception
- An error occurred
-
CloseSuite
public void CloseSuite(java.lang.String suiteName) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Close an eggPlant suite. Consult the Eggplant Functional documentation for details.- Specified by:
CloseSuite
in interfaceEggplantVirtualUserInterface
- Parameters:
suiteName
- the suite name- Throws:
java.lang.Exception
- An error occurred
-
OpenSuites
public java.util.List<java.lang.String> OpenSuites() throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get a list of the open eggPlant suites. Consult the Eggplant Functional documentation for details.- Specified by:
OpenSuites
in interfaceEggplantVirtualUserInterface
- Returns:
- the list of open suites
- Throws:
java.lang.Exception
- An error occurred
-
SetOption
public void SetOption(java.lang.String params) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Sets an option. Consult the Eggplant Functional documentation for details.- Specified by:
SetOption
in interfaceEggplantVirtualUserInterface
- Parameters:
params
- the options you are setting- Throws:
java.lang.Exception
- An error occurred
-
SetOptions
public void SetOptions(java.lang.String param, java.lang.String... params) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Sets the options. Consult the Eggplant Functional documentation for details.- Specified by:
SetOptions
in interfaceEggplantVirtualUserInterface
- Parameters:
param
- the first option to setparams
- subsequent options to set- Throws:
java.lang.Exception
- An error occurred
-
GetOption
public java.lang.Object GetOption(java.lang.String option) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Gets the value of an option. Consult the Eggplant Functional documentation for details.- Specified by:
GetOption
in interfaceEggplantVirtualUserInterface
- Parameters:
option
- the option to get- Returns:
- the option value
- Throws:
java.lang.Exception
- An error occurred
-
GetOptions
public java.lang.Object GetOptions() throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Gets the value of the global options. Consult the Eggplant Functional documentation for details.- Specified by:
GetOptions
in interfaceEggplantVirtualUserInterface
- Returns:
- the options values
- Throws:
java.lang.Exception
- An error occurred
-
CaptureScreen
public void CaptureScreen(java.lang.String name, Rectangle rectangle, boolean increment, ImageInfo imageInfo) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Capture an area of screen and save to file. Consult the Eggplant Functional documentation for details.- Specified by:
CaptureScreen
in interfaceEggplantVirtualUserInterface
- 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
public void CaptureScreen(java.lang.String imageFileName) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Capture an area of screen and save to file. Consult the Eggplant Functional documentation for details.- Specified by:
CaptureScreen
in interfaceEggplantVirtualUserInterface
- Parameters:
imageFileName
- the filepath of the captured image- Throws:
java.lang.Exception
- An error occurred
-
EggPlantVersion
public java.util.HashMap EggPlantVersion() throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get eggPlant version information Consult the Eggplant Functional documentation for details.- Specified by:
EggPlantVersion
in interfaceEggplantVirtualUserInterface
- Returns:
- the hash map of version information
- Throws:
java.lang.Exception
- An error occurred
-
ColorAtLocation
public Color ColorAtLocation(Point location) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get the color at a location. Consult the Eggplant Functional documentation for details.- Specified by:
ColorAtLocation
in interfaceEggplantVirtualUserInterface
- Parameters:
location
- the location- Returns:
- the color at the location
- Throws:
java.lang.Exception
- An error occurred
-
Connect
public 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
Description copied from interface:EggplantVirtualUserInterface
Connect to the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Connect
in interfaceEggplantVirtualUserInterface
- 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
public 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
Description copied from interface:EggplantVirtualUserInterface
Connect to the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Connect
in interfaceEggplantVirtualUserInterface
- 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
public void Connect(java.lang.String name, int portNum, java.lang.String username, java.lang.String password) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Connect to the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Connect
in interfaceEggplantVirtualUserInterface
- 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
public void Connect(java.lang.String name, ConnectionType type, java.lang.String username, java.lang.String password) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Connect to the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Connect
in interfaceEggplantVirtualUserInterface
- 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
public void Connect(java.lang.String name, int portNum, ConnectionType type, java.lang.String username, java.lang.String password) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Connect to the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Connect
in interfaceEggplantVirtualUserInterface
- 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
public void Connect(java.lang.String name, java.lang.String username, java.lang.String password) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Connect to the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Connect
in interfaceEggplantVirtualUserInterface
- 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
public void Connect(java.lang.String name, int portNum) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Connect to the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Connect
in interfaceEggplantVirtualUserInterface
- Parameters:
name
- the name of the SUTportNum
- the port num- Throws:
java.lang.Exception
- An error occurred
-
Connect
public void Connect(java.lang.String name) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Connect to the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Connect
in interfaceEggplantVirtualUserInterface
- Parameters:
name
- the name of the SUT- Throws:
java.lang.Exception
- An error occurred
-
Connect
public void Connect(ConnectionProperties connectionProperties) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Connect to the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Connect
in interfaceEggplantVirtualUserInterface
- Parameters:
connectionProperties
- the connection properties to use to connect- Throws:
java.lang.Exception
- An error occurred
-
ConnectionInfo
public ConnectionInfo ConnectionInfo(java.lang.String name) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get connection info for a connection. Consult the Eggplant Functional documentation for details.- Specified by:
ConnectionInfo
in interfaceEggplantVirtualUserInterface
- Parameters:
name
- the name of the connection- Returns:
- the connection info
- Throws:
java.lang.Exception
- An error occurred
-
Disconnect
public void Disconnect(java.lang.String name) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Disconnect from the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Disconnect
in interfaceEggplantVirtualUserInterface
- Parameters:
name
- the name of the SUT- Throws:
java.lang.Exception
- An error occurred
-
Disconnect
public void Disconnect() throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Disconnect from the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Disconnect
in interfaceEggplantVirtualUserInterface
- Throws:
java.lang.Exception
- An error occurred
-
getVU
public EggplantVirtualUser getVU()
Description copied from class:VirtualUserScript
Gets the current VU instance, as the most specialised subclass ofVirtualUser
.If you have added methods to a custom Virtual User subclass, you can call them on the object returned from this method.
e.g.
MyCustomUser thisVU = getVU(); thisVU.MyCustomOperation();
- Overrides:
getVU
in classVirtualUserScript
- Returns:
- the current VU instance
-
startEggplantSession
public void startEggplantSession() throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Start a new eggPlant session. Only one session perEggplantVirtualUser
can be active at any one time. You can end the current active session by callingEggplantVirtualUserInterface.endEggplantSession()
- Specified by:
startEggplantSession
in interfaceEggplantVirtualUserInterface
- Throws:
java.lang.Exception
- An error occurred
-
startEggplantSession
public void startEggplantSession(java.lang.String suite) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Start a new eggPlant session and open an eggPlant suite. Only one session perEggplantVirtualUser
can be active at any one time. You can end the current active session by callingEggplantVirtualUserInterface.endEggplantSession()
- Specified by:
startEggplantSession
in interfaceEggplantVirtualUserInterface
- Parameters:
suite
- the file path of the suite to open- Throws:
java.lang.Exception
- An error occurred
-
endEggplantSession
public void endEggplantSession() throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
End the current eggPlant session. Only one session perEggplantVirtualUser
can be active at any one time. You can start a new session by callingEggplantVirtualUserInterface.startEggplantSession()
- Specified by:
endEggplantSession
in interfaceEggplantVirtualUserInterface
- Throws:
java.lang.Exception
- An error occurred
-
execute
public EggplantReturnData execute(java.lang.String params) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Execute some eggPlant script code on the SUT. The code can be any legal eggPlant script code. However, it is usually easier to useEggplantVirtualUserInterface.Run(String, String...)
to execute a complete eggPlant script, rather than use this method.- Specified by:
execute
in interfaceEggplantVirtualUserInterface
- Parameters:
params
- the eggPlant script code to execute- Returns:
- the eggPlant return data
- Throws:
java.lang.Exception
- An error occurred
-
isVerbose
public boolean isVerbose()
Description copied from interface:EggplantVirtualUserInterface
Whether or not verbose logging is turned on.- Specified by:
isVerbose
in interfaceEggplantVirtualUserInterface
- Returns:
- true, if verbose logging is turned on.
-
setVerbose
public void setVerbose(boolean verbose)
Description copied from interface:EggplantVirtualUserInterface
Turns verbose logging on or off.- Specified by:
setVerbose
in interfaceEggplantVirtualUserInterface
- Parameters:
verbose
- true to turn verbose logging on, false to turn it off
-
getEggPlantDrivePort
public int getEggPlantDrivePort()
Description copied from interface:EggplantVirtualUserInterface
Gets the port that eggPlant Drive is running on.- Specified by:
getEggPlantDrivePort
in interfaceEggplantVirtualUserInterface
- Returns:
- the egg plant drive port
-
setEggPlantDrivePort
public void setEggPlantDrivePort(int port)
Description copied from interface:EggplantVirtualUserInterface
Sets the port that eggPlant Drive is running on.- Specified by:
setEggPlantDrivePort
in interfaceEggplantVirtualUserInterface
- Parameters:
port
- the new egg plant drive port
-
CaptureTextImage
public void CaptureTextImage(java.lang.String params) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Capture text image.- Specified by:
CaptureTextImage
in interfaceEggplantVirtualUserInterface
- Parameters:
params
- the params- Throws:
java.lang.Exception
- An error occurred
-
AllConnectionInfo
public java.util.List<ConnectionInfo> AllConnectionInfo() throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get a list of information about all the current connections. Consult the Eggplant Functional documentation for details.- Specified by:
AllConnectionInfo
in interfaceEggplantVirtualUserInterface
- Returns:
- the list of connection information
- Throws:
java.lang.Exception
- An error occurred
-
SendMail
public void SendMail(java.lang.String params) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Send an email. Consult the Eggplant Functional documentation for details.- Specified by:
SendMail
in interfaceEggplantVirtualUserInterface
- Parameters:
params
- the params- Throws:
java.lang.Exception
- An error occurred
-
Log
public void Log(java.lang.String text) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Log a message Consult the Eggplant Functional documentation for details.- Specified by:
Log
in interfaceEggplantVirtualUserInterface
- Parameters:
text
- the text- Throws:
java.lang.Exception
- An error occurred
-
LogWarning
public void LogWarning(java.lang.String text) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Log a warning. Consult the Eggplant Functional documentation for details.- Specified by:
LogWarning
in interfaceEggplantVirtualUserInterface
- Parameters:
text
- the text- Throws:
java.lang.Exception
- An error occurred
-
LogError
public void LogError(java.lang.String text) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Log an error. Consult the Eggplant Functional documentation for details.- Specified by:
LogError
in interfaceEggplantVirtualUserInterface
- Parameters:
text
- the text- Throws:
java.lang.Exception
- An error occurred
-
ScriptResults
public java.util.List<ScriptResults> ScriptResults(java.lang.String scriptName) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterface
Get the results of a script. Consult the Eggplant Functional documentation for details.- Specified by:
ScriptResults
in interfaceEggplantVirtualUserInterface
- Parameters:
scriptName
- the script name- Returns:
- the list of script results
- Throws:
java.lang.Exception
- An error occurred
-
getUpdatePollInterval
public int getUpdatePollInterval()
Description copied from interface:EggplantVirtualUserInterface
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.
- Specified by:
getUpdatePollInterval
in interfaceEggplantVirtualUserInterface
- Returns:
- the time in seconds between updates from eggPlant Functional.
- See Also:
EggplantVirtualUserInterface.setUpdatePollInterval(int)
-
setUpdatePollInterval
public void setUpdatePollInterval(int updatePollInterval) throws BadValueException
Description copied from interface:EggplantVirtualUserInterface
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.
- Specified by:
setUpdatePollInterval
in interfaceEggplantVirtualUserInterface
- Parameters:
updatePollInterval
- the time in seconds between updates from eggPlant Functional.- Throws:
BadValueException
- An error occurred- See Also:
EggplantVirtualUserInterface.getUpdatePollInterval()
-
-