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.voidCaptureScreen(java.lang.String imageFileName)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.EggplantVirtualUsergetVU()Gets the current VU instance, as the most specialised subclass ofVirtualUser.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.voidscript()This is the method which will be run by theVirtualUserwhen 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.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 param, 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.-
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.ExceptionDescription copied from class:VirtualUserScriptThis is the method which will be run by theVirtualUserwhen it executes this script, and is where you should write your test script code.This is an
abstractmethod 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 eachVirtualUserScriptobject 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 eachVirtualUserScriptobject is called once per iteration, in the order in which the scripts appear in the sequence. - final sequence of scripts: the
script()method of eachVirtualUserScriptobject is called once at the end of the test, in the order in which the scripts appear in the sequence.
- Specified by:
scriptin classVirtualUserScript- Throws:
java.lang.Exception- An error occurred
- initial sequence of scripts: the
-
Click
public void Click(int x, int y) throws java.lang.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceClick on a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
Clickin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceDouble click a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
DoubleClickin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceRight click a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
RightClickin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceMove to a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
MoveToin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceDrag a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
Dragin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceDrop a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
Dropin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceRead text at a point on the screen Consult the Eggplant Functional documentation for details.- Specified by:
ReadTextin 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:EggplantVirtualUserInterfaceGet the color of an image at a location. Consult the Eggplant Functional documentation for details.- Specified by:
ImageColorAtLocationin 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:EggplantVirtualUserInterfaceGet the color at a location. Consult the Eggplant Functional documentation for details.- Specified by:
ColorAtLocationin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceClicks on an image. Consult the Eggplant Functional documentation for details.- Specified by:
Clickin 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:EggplantVirtualUserInterfaceClick on a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
Clickin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceDouble click on an image. Consult the Eggplant Functional documentation for details.- Specified by:
DoubleClickin 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:EggplantVirtualUserInterfaceDouble click a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
DoubleClickin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceRight click on an image. Consult the Eggplant Functional documentation for details.- Specified by:
RightClickin 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:EggplantVirtualUserInterfaceRight click a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
RightClickin interfaceEggplantVirtualUserInterface- Parameters:
point- the point to click- Throws:
java.lang.Exception- An error occurred
-
MouseButtonDown
public void MouseButtonDown(int buttonNumber) throws java.lang.ExceptionDescription copied from interface:EggplantVirtualUserInterfacePress a mouse button down. Consult the Eggplant Functional documentation for details.- Specified by:
MouseButtonDownin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceRelease a mouse button. Consult the Eggplant Functional documentation for details.- Specified by:
MouseButtonUpin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceScroll the mouse wheel down. Consult the Eggplant Functional documentation for details.- Specified by:
ScrollWheelDownin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceScroll the mouse wheel up. Consult the Eggplant Functional documentation for details.- Specified by:
ScrollWheelUpin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceMove to an image location. Consult the Eggplant Functional documentation for details.- Specified by:
MoveToin 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:EggplantVirtualUserInterfaceMove to a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
MoveToin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceMove to a number of image locations Consult the Eggplant Functional documentation for details.- Specified by:
MoveToEachin 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:EggplantVirtualUserInterfaceMove to a number of points on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
MoveToEachin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceDrag an image. Consult the Eggplant Functional documentation for details.- Specified by:
Dragin 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:EggplantVirtualUserInterfaceDrag a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
Dragin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceDrop an image. Consult the Eggplant Functional documentation for details.- Specified by:
Dropin 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:EggplantVirtualUserInterfaceDrop a point on the screen. Consult the Eggplant Functional documentation for details.- Specified by:
Dropin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceDrag and drop from one image to another. Consult the Eggplant Functional documentation for details.- Specified by:
DragAndDropin 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:EggplantVirtualUserInterfaceDrag and drop from one point to another. Consult the Eggplant Functional documentation for details.- Specified by:
DragAndDropin 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:EggplantVirtualUserInterfaceGets the mouse location. Consult the Eggplant Functional documentation for details.- Specified by:
MouseLocationin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfacePress one or more keys down. Consult the Eggplant Functional documentation for details.- Specified by:
KeyDownin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceRelease one or more keys. Consult the Eggplant Functional documentation for details.- Specified by:
KeyUpin 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:EggplantVirtualUserInterfaceRead table. Consult the Eggplant Functional documentation for details.- Specified by:
ReadTablein 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:EggplantVirtualUserInterfaceRead text at a point on the screen Consult the Eggplant Functional documentation for details.- Specified by:
ReadTextin 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:EggplantVirtualUserInterfaceRead text from an area of the screen Consult the Eggplant Functional documentation for details.- Specified by:
ReadTextin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceGet the contents of the remote clipboard. Consult the Eggplant Functional documentation for details.- Specified by:
RemoteClipboardin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceGet the contents of the remote clipboard. Consult the Eggplant Functional documentation for details.- Specified by:
RemoteClipboardin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceSets the text on the remote clipboard. Consult the Eggplant Functional documentation for details.- Specified by:
SetRemoteClipboardin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceType text. Consult the Eggplant Functional documentation for details.- Specified by:
TypeTextin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceType text. Consult the Eggplant Functional documentation for details.- Specified by:
TypeTextin interfaceEggplantVirtualUserInterface- Parameters:
text- the text to type- Throws:
java.lang.Exception- An error occurred
-
Wait
public void Wait(double time) throws java.lang.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceWait for a period of time. Consult the Eggplant Functional documentation for details.- Specified by:
Waitin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceWait for an image to appear. Consult the Eggplant Functional documentation for details.- Specified by:
WaitForin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceWait for multiple images to appear. Consult the Eggplant Functional documentation for details.- Specified by:
WaitForAllin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceRefresh the screen. Consult the Eggplant Functional documentation for details.- Specified by:
RefreshScreenin interfaceEggplantVirtualUserInterface- Throws:
java.lang.Exception- An error occurred
-
ImageFound
public boolean ImageFound(java.lang.String image, java.lang.String... images) throws java.lang.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceGet whether or not we can find an image. Consult the Eggplant Functional documentation for details.- Specified by:
ImageFoundin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceGet whether or not we can find an image. Consult the Eggplant Functional documentation for details.- Specified by:
ImageFoundin 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:EggplantVirtualUserInterfaceGet the location of an image. Consult the Eggplant Functional documentation for details.- Specified by:
ImageLocationin 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:EggplantVirtualUserInterfaceGet the rectangle of an image. Consult the Eggplant Functional documentation for details.- Specified by:
ImageRectanglein 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:EggplantVirtualUserInterfaceGet a list of image locations. Consult the Eggplant Functional documentation for details.- Specified by:
EveryImageLocationin 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:EggplantVirtualUserInterfaceGet a list of image rectangles. Consult the Eggplant Functional documentation for details.- Specified by:
EveryImageRectanglein 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:EggplantVirtualUserInterfaceGet image information for one or more images. Consult the Eggplant Functional documentation for details.- Specified by:
ImageInfoin 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:EggplantVirtualUserInterfaceGet the hot spot location of an image Consult the Eggplant Functional documentation for details.- Specified by:
ImageHotSpotin 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:EggplantVirtualUserInterfaceGet the size of an image. Consult the Eggplant Functional documentation for details.- Specified by:
ImageSizein 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:EggplantVirtualUserInterfaceGet the color of an image at a location. Consult the Eggplant Functional documentation for details.- Specified by:
ImageColorAtLocationin 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:EggplantVirtualUserInterfaceGet information about the last image we found. Consult the Eggplant Functional documentation for details.- Specified by:
FoundImageInfoin interfaceEggplantVirtualUserInterface- Returns:
- the image info
- Throws:
java.lang.Exception- An error occurred
-
FoundImageLocation
public Point FoundImageLocation() throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterfaceGet the location of the last image we found. Consult the Eggplant Functional documentation for details.- Specified by:
FoundImageLocationin interfaceEggplantVirtualUserInterface- Returns:
- the location of the last image found
- Throws:
java.lang.Exception- An error occurred
-
FoundImageNumber
public int FoundImageNumber() throws java.lang.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceGet the number of the last image found. Consult the Eggplant Functional documentation for details.- Specified by:
FoundImageNumberin interfaceEggplantVirtualUserInterface- Returns:
- the int
- Throws:
java.lang.Exception- An error occurred
-
PauseScript
public void PauseScript() throws java.lang.ExceptionDescription copied from interface:EggplantVirtualUserInterfacePause script. Consult the Eggplant Functional documentation for details.- Specified by:
PauseScriptin 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:EggplantVirtualUserInterfaceRun an eggPlant script. Consult the Eggplant Functional documentation for details.- Specified by:
Runin 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:EggplantVirtualUserInterfaceRun an eggPlant script with new results. Consult the Eggplant Functional documentation for details.- Specified by:
RunWithNewResultsin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceOpen an eggPlant suite. Consult the Eggplant Functional documentation for details.- Specified by:
OpenSuitein 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceClose an eggPlant suite. Consult the Eggplant Functional documentation for details.- Specified by:
CloseSuitein 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceGet a list of the open eggPlant suites. Consult the Eggplant Functional documentation for details.- Specified by:
OpenSuitesin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceSets an option. Consult the Eggplant Functional documentation for details.- Specified by:
SetOptionin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceSets the options. Consult the Eggplant Functional documentation for details.- Specified by:
SetOptionsin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceGets the value of an option. Consult the Eggplant Functional documentation for details.- Specified by:
GetOptionin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceGets the value of the global options. Consult the Eggplant Functional documentation for details.- Specified by:
GetOptionsin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceCapture an area of screen and save to file. Consult the Eggplant Functional documentation for details.- Specified by:
CaptureScreenin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceCapture an area of screen and save to file. Consult the Eggplant Functional documentation for details.- Specified by:
CaptureScreenin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceGet eggPlant version information Consult the Eggplant Functional documentation for details.- Specified by:
EggPlantVersionin 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:EggplantVirtualUserInterfaceGet the color at a location. Consult the Eggplant Functional documentation for details.- Specified by:
ColorAtLocationin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceConnect to the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Connectin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceConnect to the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Connectin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceConnect to the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Connectin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceConnect to the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Connectin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceConnect to the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Connectin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceConnect to the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Connectin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceConnect to the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Connectin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceConnect to the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Connectin 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:EggplantVirtualUserInterfaceConnect to the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Connectin 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:EggplantVirtualUserInterfaceGet connection info for a connection. Consult the Eggplant Functional documentation for details.- Specified by:
ConnectionInfoin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceDisconnect from the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Disconnectin interfaceEggplantVirtualUserInterface- Parameters:
name- the name of the SUT- Throws:
java.lang.Exception- An error occurred
-
Disconnect
public void Disconnect() throws java.lang.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceDisconnect from the SUT. Consult the Eggplant Functional documentation for details.- Specified by:
Disconnectin interfaceEggplantVirtualUserInterface- Throws:
java.lang.Exception- An error occurred
-
getVU
public EggplantVirtualUser getVU()
Description copied from class:VirtualUserScriptGets 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:
getVUin classVirtualUserScript- Returns:
- the current VU instance
-
startEggplantSession
public void startEggplantSession() throws java.lang.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceStart a new eggPlant session. Only one session perEggplantVirtualUsercan be active at any one time. You can end the current active session by callingEggplantVirtualUserInterface.endEggplantSession()- Specified by:
startEggplantSessionin interfaceEggplantVirtualUserInterface- Throws:
java.lang.Exception- An error occurred
-
startEggplantSession
public void startEggplantSession(java.lang.String suite) throws java.lang.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceStart 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 callingEggplantVirtualUserInterface.endEggplantSession()- Specified by:
startEggplantSessionin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceEnd the current eggPlant session. Only one session perEggplantVirtualUsercan be active at any one time. You can start a new session by callingEggplantVirtualUserInterface.startEggplantSession()- Specified by:
endEggplantSessionin interfaceEggplantVirtualUserInterface- Throws:
java.lang.Exception- An error occurred
-
execute
public EggplantReturnData execute(java.lang.String params) throws java.lang.Exception
Description copied from interface:EggplantVirtualUserInterfaceExecute 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:
executein 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:EggplantVirtualUserInterfaceWhether or not verbose logging is turned on.- Specified by:
isVerbosein interfaceEggplantVirtualUserInterface- Returns:
- true, if verbose logging is turned on.
-
setVerbose
public void setVerbose(boolean verbose)
Description copied from interface:EggplantVirtualUserInterfaceTurns verbose logging on or off.- Specified by:
setVerbosein interfaceEggplantVirtualUserInterface- Parameters:
verbose- true to turn verbose logging on, false to turn it off
-
getEggPlantDrivePort
public int getEggPlantDrivePort()
Description copied from interface:EggplantVirtualUserInterfaceGets the port that eggPlant Drive is running on.- Specified by:
getEggPlantDrivePortin interfaceEggplantVirtualUserInterface- Returns:
- the egg plant drive port
-
setEggPlantDrivePort
public void setEggPlantDrivePort(int port)
Description copied from interface:EggplantVirtualUserInterfaceSets the port that eggPlant Drive is running on.- Specified by:
setEggPlantDrivePortin interfaceEggplantVirtualUserInterface- Parameters:
port- the new egg plant drive port
-
CaptureTextImage
public void CaptureTextImage(java.lang.String params) throws java.lang.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceCapture text image.- Specified by:
CaptureTextImagein 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:EggplantVirtualUserInterfaceGet a list of information about all the current connections. Consult the Eggplant Functional documentation for details.- Specified by:
AllConnectionInfoin 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.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceSend an email. Consult the Eggplant Functional documentation for details.- Specified by:
SendMailin interfaceEggplantVirtualUserInterface- Parameters:
params- the params- Throws:
java.lang.Exception- An error occurred
-
Log
public void Log(java.lang.String text) throws java.lang.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceLog a message Consult the Eggplant Functional documentation for details.- Specified by:
Login interfaceEggplantVirtualUserInterface- Parameters:
text- the text- Throws:
java.lang.Exception- An error occurred
-
LogWarning
public void LogWarning(java.lang.String text) throws java.lang.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceLog a warning. Consult the Eggplant Functional documentation for details.- Specified by:
LogWarningin interfaceEggplantVirtualUserInterface- Parameters:
text- the text- Throws:
java.lang.Exception- An error occurred
-
LogError
public void LogError(java.lang.String text) throws java.lang.ExceptionDescription copied from interface:EggplantVirtualUserInterfaceLog an error. Consult the Eggplant Functional documentation for details.- Specified by:
LogErrorin 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:EggplantVirtualUserInterfaceGet the results of a script. Consult the Eggplant Functional documentation for details.- Specified by:
ScriptResultsin 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:EggplantVirtualUserInterfaceGet 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:
getUpdatePollIntervalin interfaceEggplantVirtualUserInterface- Returns:
- the time in seconds between updates from eggPlant Functional.
- See Also:
EggplantVirtualUserInterface.setUpdatePollInterval(int)
-
setUpdatePollInterval
public void setUpdatePollInterval(int updatePollInterval) throws BadValueExceptionDescription copied from interface:EggplantVirtualUserInterfaceSet 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:
setUpdatePollIntervalin interfaceEggplantVirtualUserInterface- Parameters:
updatePollInterval- the time in seconds between updates from eggPlant Functional.- Throws:
BadValueException- An error occurred- See Also:
EggplantVirtualUserInterface.getUpdatePollInterval()
-
-