public class SAFSEngineCommands extends SAFSWorker
Default usage:
Instantiate *and* initialize Solo API object according to the Solo class, then: SAFSEngineCommands engine = new SAFSEngineCommands(solo); (use the API)Note: SAFSEngineCommands 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 |
---|
SAFSEngineCommands(Solo solo)
Default (required) public constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clearHighlightedDialog()
|
void |
clearReferenceCache()
|
java.lang.String |
getAccessibleName(java.lang.String uID)
|
java.lang.String |
getCaption(java.lang.String uID)
|
int |
getChildCount(java.lang.String uID)
|
java.lang.String[] |
getChildren(java.lang.String uID)
|
int |
getClassIndex(java.lang.String uID)
|
java.lang.String |
getClassname(java.lang.String uID)
|
java.lang.String |
getCurrentWindow()
|
java.lang.String |
getId(java.lang.String uID)
|
java.lang.String |
getMatchingChildObjects(java.lang.String parentUID,
java.lang.String recognition)
|
java.lang.String |
getMatchingParentObject(java.lang.String recognition)
|
java.lang.String |
getName(java.lang.String uID)
|
java.lang.String |
getNonAccessibleName(java.lang.String uID)
|
java.lang.String |
getProperty(java.lang.String uID,
java.lang.String propertyName)
|
java.lang.String[] |
getPropertyNames(java.lang.String uID)
|
java.lang.String[] |
getSuperclassNames(java.lang.String uID)
|
java.lang.String |
getText(java.lang.String uID)
|
int |
getTopLevelCount()
|
java.lang.String[] |
getTopLevelWindows()
|
void |
highlightMatchingChildObjectByKey(java.lang.String parentUID,
java.lang.String childUID)
|
boolean |
isEnabled(java.lang.String uID)
|
boolean |
isShowing(java.lang.String uID)
|
boolean |
isTopLevelPopupContainer(java.lang.String uID)
|
boolean |
isValid(java.lang.String uID)
|
void |
setActiveWindow(java.lang.String uID)
|
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, getTextViewValue, getTopParent, getView, getView, getView, getViewByName, getViewByName, getViewByTag, getViewByTag, getViewClassName, getViewLocation, getViews, getViews, getWebElement, getWebElements, getWebElements, getWebUrl, goBack, goBackToActivity, hideSoftKeyboard, 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 SAFSEngineCommands(Solo solo)
solo
- Solo instance already created and initialized.public void clearHighlightedDialog() 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 clearReferenceCache() 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 getAccessibleName(java.lang.String uID) 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 getCaption(java.lang.String uID) 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 getCurrentWindow() 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 int getChildCount(java.lang.String uID) 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[] getChildren(java.lang.String uID) 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 int getClassIndex(java.lang.String uID) 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 getClassname(java.lang.String uID) 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 getId(java.lang.String uID) 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 getMatchingChildObjects(java.lang.String parentUID, java.lang.String recognition) 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 getMatchingParentObject(java.lang.String recognition) 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 getName(java.lang.String uID) 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 getNonAccessibleName(java.lang.String uID) 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 getProperty(java.lang.String uID, java.lang.String propertyName) 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[] getPropertyNames(java.lang.String uID) 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[] getSuperclassNames(java.lang.String uID) 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 getText(java.lang.String uID) throws java.lang.IllegalThreadStateException, RemoteException, java.util.concurrent.TimeoutException, ShutdownInvocationException
getText
in class Solo
uID
- that is shownSolo._last_remote_result
contains the returned Properties object.
The KEY_, PARAM_, STATUS_, cmd_, and target_ constants all come from the Message class and are used here and in the device/emulator Robotium Test Runner.
(in ):KEY_TARGET= solo (in ):KEY_COMMAND= cmd_getetexttext (out):KEY_ISREMOTERESULT=true (out):KEY_REMOTERESULTCODE=String:int:0=success/normal=STATUS_REMOTERESULT_OK (out):KEY_REMOTERESULTINFO=String containing the UID (unique ID) reference for the actual object stored in remote cache. (in ):PARAM_TEXT=String
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
SoloRemoteControl.performRemotePropsCommand(Properties, int, int, int)
,
Solo._last_remote_result
,
Message
public int getTopLevelCount() 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[] getTopLevelWindows() 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 highlightMatchingChildObjectByKey(java.lang.String parentUID, java.lang.String childUID) 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 isEnabled(java.lang.String uID) 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 isShowing(java.lang.String uID) 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 isValid(java.lang.String uID) 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 isTopLevelPopupContainer(java.lang.String uID) 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 setActiveWindow(java.lang.String uID) 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
Copyright © SAS Institute. All Rights Reserved.