public class SAFSDriverCommands extends SAFSWorker
Default usage:
Instantiate *and* initialize Solo API object according to the Solo class, then: SAFSDriverCommands driver = new SAFSDriverCommands(solo); (use the API)Note: SAFSDriverCommands can use component UID references that have been acquired from either the remote control Solo class APIs or the SAFSEngineCommands APIs.
SoloTest
_last_remote_result, androidsdk, CLOSED, DELETE, DOWN, ENTER, LANDSCAPE, LEFT, MENU, OPENED, PORTRAIT, RIGHT, UP
_props, CAUSE_SEP, control, default_connect_stimeout, default_ready_stimeout, default_result_stimeout, default_running_stimeout, default_shutdown_stimeout, doProcessFailure, doProcessSuccess, err, FAIL_SUFFIX, listenername, log, out, PASS_SUFFIX, tcp_delay
Constructor and Description |
---|
SAFSDriverCommands(Solo solo)
Default (required) public constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
assignClipboardVariable()
Same as getClipboard.
|
void |
clearClipboard()
ClearClipboard
Clear the device clipboard.
|
java.lang.String |
getClipboard()
AssignClipboardVariable
Retrieve text contents of the device clipboard.
|
java.awt.image.BufferedImage |
getScreenShot(boolean rotatable)
|
boolean |
hideSoftKeyboard()
|
void |
setClipboard(java.lang.String text)
|
boolean |
showSoftKeyboard()
|
java.awt.image.BufferedImage |
takeScreenShot(boolean rotatable)
Same as getScreenShot.
|
boolean |
waitForGUI(java.lang.String winrec,
java.lang.String comprec,
int stimeout)
|
boolean |
waitForGUIGone(java.lang.String winrec,
java.lang.String comprec,
int stimeout)
|
createRemoteControl, getListenerName
assertCurrentActivityClass, assertCurrentActivityClass, assertCurrentActivityName, assertCurrentActivityName, assertMemoryNotLow, clearEditText, clearEditText, clearLog, clearTextInWebElement, clickInList, clickInList, clickLongInList, clickLongInList, clickLongInList, clickLongOnScreen, clickLongOnScreen, clickLongOnText, clickLongOnText, clickLongOnText, clickLongOnText, clickLongOnTextAndPress, clickLongOnView, clickLongOnView, clickOnActionBarHomeButton, clickOnActionBarItem, clickOnButton, clickOnButton, clickOnCheckBox, clickOnEditText, clickOnImage, clickOnImageButton, clickOnMenuItem, clickOnMenuItem, clickOnRadioButton, clickOnScreen, clickOnScreen, clickOnText, clickOnText, clickOnText, clickOnToggleButton, clickOnView, clickOnView, clickOnWebElement, clickOnWebElement, clickOnWebElement, clickOnWebElement, drag, enterText, enterText, enterTextInWebElement, finalizeRemoteSolo, finishOpenedActivities, getActivityMonitor, getAllOpenActivities, getButton, getButton, getButton, getCurrentActivity, getCurrentButtons, getCurrentCheckBoxes, getCurrentDatePickers, getCurrentEditTexts, getCurrentGridViews, getCurrentImageButtons, getCurrentImageViews, getCurrentListViews, getCurrentNumberPickers, getCurrentProgressBars, getCurrentRadioButtons, getCurrentScrollViews, getCurrentSlidingDrawers, getCurrentSpinners, getCurrentTextViews, getCurrentTimePickers, getCurrentToggleButtons, getCurrentViews, getCurrentViews, getCurrentViews, getCurrentViews, getCurrentViews, getCurrentWebElements, getCurrentWebElements, getEditText, getEditText, getEditText, getGUIImage, getImage, getImageButton, getObjectClassName, getScreenshotSequence, getScreenshotSequence, getScreenshotSequenceSize, getScreenSize, getString, getString, getTagForView, getText, getText, getText, getTextViewValue, getTopParent, getView, getView, getView, getViewByName, getViewByName, getViewByTag, getViewByTag, getViewClassName, getViewLocation, getViews, getViews, getWebElement, getWebElements, getWebElements, getWebUrl, goBack, goBackToActivity, isCheckBoxChecked, isCheckBoxChecked, isRadioButtonChecked, isRadioButtonChecked, isSpinnerTextSelected, isSpinnerTextSelected, isTextChecked, isToggleButtonChecked, isToggleButtonChecked, pinchToZoom, pressMenuItem, pressMenuItem, pressSoftKeyboardNextButton, pressSoftKeyboardSearchButton, pressSpinnerItem, rotateLarge, rotateSmall, scrollDown, scrollDownList, scrollDownListUID, scrollListToBottom, scrollListToBottomUID, scrollListToLine, scrollListToLineUID, scrollListToTop, scrollListToTopUID, scrollToBottom, scrollToSide, scrollToSide, scrollToSide, scrollToTop, scrollUp, scrollUpList, scrollUpListUID, scrollViewToSide, scrollViewToSide, scrollViewToSide, searchButton, searchButton, searchButton, searchButton, searchEditText, searchText, searchText, searchText, searchText, searchText, searchToggleButton, searchToggleButton, sendKey, setActivityOrientation, setDatePicker, setDatePicker, setMobileData, setNavigationDrawer, setProgressBar, setProgressBar, setSlidingDrawer, setSlidingDrawer, setTimePicker, setTimePicker, setWiFiData, sleep, startMainLauncher, startScreenshotSequence, startScreenshotSequence, stopScreenshotSequence, swipe, takeScreenshot, takeScreenshot, takeScreenshot, typeText, typeText, typeTextInWebElement, typeTextInWebElement, typeTextInWebElement, unlockScreen, waitForActivity, waitForActivity, waitForActivityByClass, waitForActivityByClass, waitForCondition, waitForDialogToClose, waitForDialogToClose, waitForDialogToOpen, waitForDialogToOpen, waitForEmptyActivityStack, waitForFragmentById, waitForFragmentByTag, waitForLogMessage, waitForText, waitForText, waitForText, waitForText, waitForView, waitForView, waitForView, waitForView, waitForView, waitForView, waitForViewByTag, waitForViewByTag, waitForViewByTag, waitForViewUID, waitForViewUID, waitForWebElement, waitForWebElement, waitForWebElement
debug, getRemoteControl, initialize, onReceiveDebug, prepInstrumentDispatch, prepSoloDispatch, processFailure, processSuccess, setControllerPort, setLogsInterface, setPortForwarding, setRemoteControl, shutdown, shutdownRemote, turnProtocolDebug, turnRunnerDebug
public SAFSDriverCommands(Solo solo)
solo
- Solo instance already created and initialized.public void clearClipboard() throws java.lang.IllegalThreadStateException, RemoteException, java.util.concurrent.TimeoutException, ShutdownInvocationException
java.lang.IllegalThreadStateException
RemoteException
- -- if a remote exception was thrown, or if the status indicates the command
did not execute properly on the remote device or emulator.java.util.concurrent.TimeoutException
ShutdownInvocationException
public void setClipboard(java.lang.String text) throws java.lang.IllegalThreadStateException, RemoteException, java.util.concurrent.TimeoutException, ShutdownInvocationException
text
- -- to put on the device clipboard.java.lang.IllegalThreadStateException
RemoteException
- -- if a remote exception was thrown, or if the status indicates the command
did not execute properly on the remote device or emulator.java.util.concurrent.TimeoutException
ShutdownInvocationException
public java.lang.String getClipboard() throws java.lang.IllegalThreadStateException, RemoteException, java.util.concurrent.TimeoutException, ShutdownInvocationException
java.lang.IllegalThreadStateException
RemoteException
- -- if a remote exception was thrown, or if the status indicates the command
did not execute properly on the remote device or emulator.java.util.concurrent.TimeoutException
ShutdownInvocationException
public java.lang.String assignClipboardVariable() throws java.lang.IllegalThreadStateException, RemoteException, java.util.concurrent.TimeoutException, ShutdownInvocationException
java.lang.IllegalThreadStateException
RemoteException
java.util.concurrent.TimeoutException
ShutdownInvocationException
getClipboard()
public boolean hideSoftKeyboard() throws java.lang.IllegalThreadStateException, RemoteException, java.util.concurrent.TimeoutException, ShutdownInvocationException
hideSoftKeyboard
in class Solo
java.lang.IllegalThreadStateException
RemoteException
- -- if a remote exception was thrown, or if the status indicates the command
did not execute properly on the remote device or emulator.java.util.concurrent.TimeoutException
ShutdownInvocationException
Solo.getCurrentObjects(Properties)
,
Solo._last_remote_result
,
Message
public boolean showSoftKeyboard() throws java.lang.IllegalThreadStateException, RemoteException, java.util.concurrent.TimeoutException, ShutdownInvocationException
java.lang.IllegalThreadStateException
RemoteException
- -- if a remote exception was thrown, or if the status indicates the command
did not execute properly on the remote device or emulator.java.util.concurrent.TimeoutException
ShutdownInvocationException
public boolean waitForGUI(java.lang.String winrec, java.lang.String comprec, int stimeout) throws java.lang.IllegalThreadStateException, RemoteException, java.util.concurrent.TimeoutException, ShutdownInvocationException
winrec
- -- SAFS window recognition string, or UID reference from Solo or SAFSEngineCommandscomprec
- -- SAFS component recognition string, or UID reference from Solo or SAFSEngineCommandsstimeout
- -- wait timeout in seconds. If less than 0 then uses default 15 second wait timeout.java.lang.IllegalThreadStateException
RemoteException
- -- if a remote exception was thrown, or if the status indicates the command
did not execute properly on the remote device or emulator.java.util.concurrent.TimeoutException
ShutdownInvocationException
Solo
,
SAFSEngineCommands
public boolean waitForGUIGone(java.lang.String winrec, java.lang.String comprec, int stimeout) throws java.lang.IllegalThreadStateException, RemoteException, java.util.concurrent.TimeoutException, ShutdownInvocationException
winrec
- -- SAFS window recognition string, or UID reference from Solo or SAFSEngineCommandscomprec
- -- SAFS component recognition string, or UID reference from Solo or SAFSEngineCommandsstimeout
- -- wait timeout in seconds. If less than 0 then uses default 15 second wait timeout.java.lang.IllegalThreadStateException
RemoteException
- -- if a remote exception was thrown, or if the status indicates the command
did not execute properly on the remote device or emulator.java.util.concurrent.TimeoutException
ShutdownInvocationException
Solo
,
SAFSEngineCommands
public java.awt.image.BufferedImage getScreenShot(boolean rotatable) throws java.lang.IllegalThreadStateException, RemoteException, java.util.concurrent.TimeoutException, ShutdownInvocationException
rotatable
- -- true if the app/screen might be rotated and the image should be flipped appropriately.java.lang.IllegalThreadStateException
RemoteException
- -- if a remote exception was thrown, or if the status indicates the command
did not execute properly on the remote device or emulator.java.util.concurrent.TimeoutException
ShutdownInvocationException
public java.awt.image.BufferedImage takeScreenShot(boolean rotatable) throws java.lang.IllegalThreadStateException, RemoteException, java.util.concurrent.TimeoutException, ShutdownInvocationException
java.lang.IllegalThreadStateException
RemoteException
java.util.concurrent.TimeoutException
ShutdownInvocationException
getScreenShot(boolean)
Copyright © SAS Institute. All Rights Reserved.