public class SoloProcessor extends AbstractProcessor implements CacheReferenceInterface
SoloMessage
For example:
For command "assertCurrentActivityClass", at the Returns part, you can see
(in ):KEY_TARGET=target_solo
(in ):KEY_COMMAND=cmd_assertcurrentactivityclass
(out):KEY_ISREMOTERESULT=true
(out):KEY_REMOTERESULTCODE=String:int:0=success/normal=SoloMessage.STATUS_REMOTERESULT_OK
.....
When it marks a 'in', you should get; while it marks a 'out', you should set it with a result
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Hashtable<java.lang.String,android.app.Activity> |
activityCache
local cache for containing the
Activity
Note: Don't manipulate it directly like activityCache.get(key) etc.Use the cache-manipulation-methods defined in AbstractProcessor |
protected java.util.Hashtable<java.lang.String,android.app.Instrumentation.ActivityMonitor> |
activityMonitorCache
local cache for containing the
Instrumentation.ActivityMonitor
Note: Don't manipulate it directly like activityMonitorCache.get(key) etc.Use the cache-manipulation-methods defined in AbstractProcessor |
(package private) RobotiumTestCase |
activityrunner |
(package private) android.app.Activity |
mainApp
The main
Activity object. |
(package private) RobotiumTestRunner |
robotiumTestrunner |
(package private) RCSolo |
solo
The instance of
RCSolo, it is usedto do the real work for handling the messages from 'solo remote control' |
static java.lang.String |
TAG |
protected java.util.Hashtable<java.lang.String,java.lang.Object> |
tagCache
local cache for containing the
View.getTag()Note: Don't manipulate it directly like tagCache.get(key) etc. Use the cache-manipulation-methods defined in AbstractProcessor |
protected java.util.Hashtable<java.lang.String,android.view.View> |
viewCache
local cache for containing the
View
Note: Don't manipulate it directly like viewCache.get(key) etc.Use the cache-manipulation-methods defined in AbstractProcessor |
protected java.util.Hashtable<java.lang.String,com.robotium.solo.WebElement> |
webElementCache
local cache for containing the
WebElement
Note: Don't manipulate it directly like webElementCache.get(key) etc.Use the cache-manipulation-methods defined in AbstractProcessor |
INITIAL_CACHE_SIZE, remoteCommand, testRunner| Constructor and Description |
|---|
SoloProcessor(RobotiumTestRunner robotiumTestrunner) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCacheReferenceInterface(CacheReferenceInterface cache)
CacheReferenceInterface implementation.
|
(package private) void |
assertCurrentActivity(java.util.Properties props)
assert the current activity has the given name/class, with the possibility to verify that
the expected Activity is a new instance of the Activity. |
(package private) void |
assertMemoryNotLow(java.util.Properties props)
assert that the memory is enough
|
protected boolean |
checkSolo()
Test if the solo is null.
|
void |
clearCache(boolean useChain)
CacheReferenceInterface implementation.
|
(package private) void |
clearEditText(java.util.Properties props)
clear the text in
EditText |
(package private) void |
clearTextInWebElement(java.util.Properties props)
Clears text in a WebElement matching the specified By object.
|
(package private) void |
clickInList(java.util.Properties props,
boolean longtime)
click an item in android.widget.ListView
|
(package private) void |
clickOnActionBarItem(java.util.Properties props)
Clicks on an ActionBar item with a given resource id.
Requires Robotium 3.6 |
(package private) void |
clickOnMenuItem(java.util.Properties props,
boolean subMenu)
click on a 'menu item' indicated by text
|
(package private) void |
clickOnScreen(java.util.Properties props,
boolean longtime)
click some point on screen
|
(package private) void |
clickOnText(java.util.Properties props,
boolean longtime)
click on a string within the current
|
(package private) void |
clickOnView(java.util.Properties props,
boolean longtime)
click on a
ViewThe view's id is given by parameter, according to this id, We will find the View from local cache viewCache and click on it.This method has no relationship with method clickOnViewByIndex(Properties) |
(package private) void |
clickOnViewByIndex(java.util.Properties props)
click on the following
TextView by indexCheckBoxEditTextImageViewImageButtonRadioButtonButtonThe index is given by parameter, according to that index Solo will click on the appropriate TextView. This method has no relationship with method clickOnView(Properties, boolean) |
(package private) void |
clickOnViewByName(java.util.Properties props)
click on the following
TextView by nameButtonToggleButtonThe name is given by parameter, according to that name Solo will click on the appropriate TextView. This method has no relationship with method clickOnView(Properties, boolean) |
(package private) void |
clickOnWebElement(java.util.Properties props)
Clicks a WebElement matching the specified By object.
|
(package private) void |
clickOnWebElementByUID(java.util.Properties props)
Clicks a WebElement stored in cache by reference UID.
|
(package private) void |
drag(java.util.Properties props)
Simulate touching a given location and dragging it to a new location.
|
(package private) void |
enterText(java.util.Properties props)
input the text in
EditText |
(package private) void |
enterTextInWebElement(java.util.Properties props)
Enters text in a WebElement matching the specified By object.
|
(package private) void |
finalizeRemoteSolo(java.util.Properties props)
Finalizes the solo object and removes the ActivityMonitor.
|
(package private) void |
finishOpenedActivities(java.util.Properties props)
All activities that have been active are finished.
|
(package private) void |
getActivityMonitor(java.util.Properties props)
Returns a String UID for the Robotium Solo Activity Monitor
Use a cache to store the ActivityMonitor. If the ActivityMonitor doesn't exist in the cache, we generate an ID and put the ActivityMonitor into cache with that ID. If the ActivityMonitor exists in the cache, we just return the related ID. |
(package private) void |
getAllOpenActivities(java.util.Properties props)
get all activities and return their ID in format ";ID;ID;ID"
the ID string will be stored in remoteresultinfo of parameter props. |
protected android.graphics.Bitmap |
getBitmapOfView(android.view.View view)
Get bitmap image of a View.
This method call View.getDrawingCache() to get the bitmap image.For some special views, we can't generate the bitmap by this way. |
java.lang.Object |
getCachedObject(java.lang.String key,
boolean useChain)
CacheReferenceInterface implementation.
|
(package private) void |
getCurrentActivity(java.util.Properties props)
get the current activity and return its ID
the ID string will be stored in remoteresultinfo of parameter props. |
(package private) void |
getCurrentViews(java.util.Properties props)
get all the
Views of following type:ButtonCheckBoxDatePickerEditTextGridViewImageButtonImageViewListViewProgressBarRadioButtonScrollViewSlidingDrawerSpinnerTextViewTimePickerToggleButtonView |
(package private) void |
getCurrentWebElements(java.util.Properties props)
get the current WebElements and return its ID
the ID string will be stored in remoteresultinfo of parameter props. |
(package private) void |
getGuiImage(java.util.Properties props)
Get image of a View.
According to the view's id, try to get a View from cache. If not found, a ProcessorException will be thrown out.If a view is found, we will get the bitmap of that view and compress the bytes to String and return it through KEY_REMOTERESULTINFO |
(package private) java.lang.String |
getImageBase64EncodedString(java.lang.String filename,
java.lang.StringBuffer absoluteFilePath)
Read a JPG file with name 'filename' from folder '/sdcard/Robotium-Screenshots/', then encode it to
a String and return, this method doesn't care when the image file is created.
|
(package private) java.lang.String |
getImageBase64EncodedString(java.lang.String filename,
java.lang.StringBuffer absoluteFilePath,
long newerThan)
Read a JPG file with name 'filename' from folder '/sdcard/Robotium-Screenshots/', then encode it to
a String and return, this method will only read the image file created after the time provide
by parameter 'newerThan'
|
(package private) void |
getObjectClassName(java.util.Properties props,
boolean isViewObject)
Get class name of an object.
According to the object's id, try to get it from cache. If not found, a ProcessorException will be thrown out.If it is found, we will get its class name and return through KEY_REMOTERESULTINFO |
(package private) void |
getScreenshotSequence(java.util.Properties props)
Retrieve a sequence of screenshots, which are stored in "/sdcard/Robotium-Screenshots/".
Requires Robotium 4.1+ |
(package private) void |
getScreenSize(java.util.Properties props)
Get the screen's size.
|
(package private) void |
getString(java.util.Properties props)
Returns a localized String from localized String resources, according to 'resource id'
in a current Activity, or a String resource name in the context of the
current package, or the android package.
given by Message.PARAM_RESID or Message.PARAM_ID |
(package private) void |
getTagForView(java.util.Properties props)
Get the View's Tag accroding to a View's UID, and return the Tag's UID.
|
(package private) void |
getTextViewValue(java.util.Properties props)
According to the view's id, try to get a View of type 'TextView'.
|
(package private) void |
getTopParent(java.util.Properties props)
Get the top parent view of the given view, identified by the parameter
Message.PARAM_REFERENCE |
(package private) void |
getViewById(java.util.Properties props)
get the
View by id (R.id)can also get the nth View by id at a provided index. |
(package private) void |
getViewByIndex(java.util.Properties props)
get the following
TextView by indexButtonEditTextTextViewImageViewImageButtonThe index is given by parameter, according to that index Solo will get the appropriate TextView. |
(package private) void |
getViewByName(java.util.Properties props)
get the
View by resource idname. |
(package private) void |
getViewByTag(java.util.Properties props)
get the
View by Tag Object. |
(package private) void |
getViewByText(java.util.Properties props)
get the following
TextView by textButtonEditTextTextViewThe text is given by parameter, according to that text Solo will get the appropriate TextView. |
(package private) void |
getViewClassName(java.util.Properties props)
Deprecated.
we can use
getObjectClassName(Properties, boolean) instead |
(package private) void |
getViewLocation(java.util.Properties props)
Get the View's location, (x,y,width,height).
|
(package private) void |
getViewsInParent(java.util.Properties props)
Get all the views belonging to a parent view.
|
(package private) void |
goBack(java.util.Properties props)
Simulates pressing the hardware back key.
|
(package private) void |
goBackToActivity(java.util.Properties props)
Returns to the given Activity.
|
(package private) void |
handleComandWithoutParams(java.util.Properties props)
Handle the commands without parameters
|
(package private) void |
handleConfigScreenshotFileTypeCommands(java.util.Properties props)
Handle the GET/SET commands for Solo.Config.screenshotFileType.
|
(package private) void |
handleConfigScreenshotSavePathCommands(java.util.Properties props)
Handle the GET/SET commands for Solo.Config.screenshotSavePath.
|
(package private) void |
handleConfigShouldScrollCommands(java.util.Properties props)
Handle the GET/SET commands for Solo.Config.shouldScroll.
|
(package private) void |
handleConfigTimeoutCommands(java.util.Properties props)
Handle the GET/SET commands for Solo.Config.timeout_small and Solo.Config.timeout_large.
|
(package private) void |
handleConfigUseJavaScriptToClickWebElementsCommands(java.util.Properties props)
Handle the GET/SET commands for Solo.Config.useJavaScriptToClickWebElements.
|
(package private) void |
handleRobotiumTimeoutCommand(java.util.Properties props)
Handle the static methods of class Timeout.
Requires Robotium 4.1+ |
(package private) void |
handleRobotiumUtilsCommand(java.util.Properties props)
Handle the static methods of class RobotiumUtils.
Requires Robotium 4.1 |
(package private) void |
handleZoomRotateSwipe(java.util.Properties props)
Handle the zoom, rotate, swipe methods of Robotium Solo.
Requires Robotium 4.1+ |
(package private) void |
isViewByIndexChecked(java.util.Properties props)
test if the following
TextView is checked.CheckBoxRadioButtonSpinnerToggleButtonThe index is given by parameter, according to that index Solo will get the appropriate View and test if it is checked. |
(package private) void |
isViewByTextChecked(java.util.Properties props)
test if the following
TextView is checked.CheckBoxRadioButtonSpinnerToggleButtonThe text is given by parameter, according to that text Solo will get the appropriate View and test if it is checked. |
(package private) void |
pressMenuItem(java.util.Properties props)
press an item in
android.widget.Menu |
(package private) void |
pressSoftKeyboardNextButton(java.util.Properties props)
Press the soft keyboard Next button.
Requires Robotium 5.0.1 |
(package private) void |
pressSoftKeyboardSearchButton(java.util.Properties props)
Press the soft keyboard Search button.
Requires Robotium 5.x |
(package private) void |
pressSpinnerItem(java.util.Properties props)
press an item in
Spinner |
void |
processProperties(java.util.Properties props)
Before calling this method, you should call setRemoteCommand()
|
void |
removeCacheReferenceInterface(CacheReferenceInterface cache)
CacheReferenceInterface implementation.
|
(package private) void |
scroll(java.util.Properties props)
scroll vertically.
|
(package private) void |
scrollToSide(java.util.Properties props)
scroll horizontally.
scrollPosition is an optional parameter. |
(package private) void |
searchView(java.util.Properties props)
search the following view.
ButtonEditTextTextViewToggleButton |
(package private) void |
sendKey(java.util.Properties props)
send a key to current view.
|
(package private) void |
setActivityOrientation(java.util.Properties props)
set orientation of view.
|
(package private) void |
setDatePicker(java.util.Properties props)
set value of
DatePicker. |
(package private) void |
setMobileData(java.util.Properties props)
Turn on/off 'mobile data'
|
(package private) void |
setNavigationDrawer(java.util.Properties props)
Sets the status of the
NavigationDrawer. |
(package private) void |
setProgressBar(java.util.Properties props)
set value of
ProgressBar. |
(package private) void |
setSlidingDrawer(java.util.Properties props)
set value of
SlidingDrawer. |
(package private) void |
setTimePicker(java.util.Properties props)
set value of
TimePicker. |
(package private) void |
setWiFiData(java.util.Properties props)
Turn on/off 'wifi data'
|
(package private) void |
sleep(java.util.Properties props)
Robotium will sleep for a specified time (milliseconds).
|
protected void |
startMainLauncher(java.util.Properties props)
This method will launch the main activity.
It will initialize the Solo object of RobotiumTestRunnerThis Solo object will also be shared by this class If you want to use the Solo object, you MUST call this method firstly. |
(package private) void |
startScreenshotSequenceMax(java.util.Properties props)
Takes a screenshot sequence and stores the images via the Robotium Solo API.
Requires Robotium 4.2 |
(package private) void |
takeScreenshot(java.util.Properties props)
Takes a Screenshot and retrieve it from /sdcard/Robotium-Screenshots/.
Requires Robotium 3.4.1 |
(package private) void |
typeTextInWebElementByUID(java.util.Properties props)
Type text in a WebElement stored in cache by reference UID.
|
(package private) void |
waitForActivity(java.util.Properties props)
Wait for
Activity. |
(package private) void |
waitForCondition(java.util.Properties props)
Waits for a condition to be satisfied.
|
(package private) void |
waitForDialog(java.util.Properties props)
Wait for
Dialog to close/open. |
(package private) void |
waitForEmptyActivityStack(java.util.Properties props)
Wait for Empty Activity Stack.
Requires Robotium 5.0.1 |
(package private) void |
waitForFragmentById(java.util.Properties props)
Wait for a V4 Fragment by Id.
Requires Robotium 3.4.1 |
(package private) void |
waitForFragmentByTag(java.util.Properties props)
Wait for a V4 Fragment by Tag.
Requires Robotium 3.4.1 |
(package private) void |
waitForLogMessage(java.util.Properties props)
Wait for a specific log message.
Requires Robotium 3.4.1 |
(package private) void |
waitForText(java.util.Properties props)
Wait for
TextView. |
(package private) void |
waitForView(java.util.Properties props)
Wait for
View. |
(package private) void |
waitForViewByID(java.util.Properties props)
Wait for
View according to ID (R.id) Requires Robotium4.1+ |
(package private) void |
waitForViewByTag(java.util.Properties props)
Wait for
View. |
(package private) void |
waitForViewUID(java.util.Properties props)
Wait for
View. |
(package private) void |
waitForWebElement(java.util.Properties props)
Wait for
WebElement. |
cacheContainValue, convertToKey, convertToKeys, convertToKeys, debug, getCachedItem, getCacheKeyForValue, getStackTrace, makeUniqueCacheKey, processMessage, putCachedItem, removeCachedItem, resetExternalModeCache, setGeneralError, setGeneralError, setGeneralErrorWithSpecialInfo, setGeneralErrorWithSpecialInfo, setGeneralSuccess, setGeneralSuccess, setGeneralSuccessWithSpecialInfo, setGeneralWarningWithSpecialInfo, setRemoteCommand, stringIsMatchedpublic static java.lang.String TAG
android.app.Activity mainApp
Activity object.RCSolo solo
RCSolo, it is usedRobotiumTestCase activityrunner
RobotiumTestRunner robotiumTestrunner
protected java.util.Hashtable<java.lang.String,android.app.Instrumentation.ActivityMonitor> activityMonitorCache
Instrumentation.ActivityMonitor
Note: Don't manipulate it directly like activityMonitorCache.get(key) etc.AbstractProcessorprotected java.util.Hashtable<java.lang.String,android.app.Activity> activityCache
Activity
Note: Don't manipulate it directly like activityCache.get(key) etc.AbstractProcessorprotected java.util.Hashtable<java.lang.String,android.view.View> viewCache
View
Note: Don't manipulate it directly like viewCache.get(key) etc.AbstractProcessorprotected java.util.Hashtable<java.lang.String,com.robotium.solo.WebElement> webElementCache
WebElement
Note: Don't manipulate it directly like webElementCache.get(key) etc.AbstractProcessorprotected java.util.Hashtable<java.lang.String,java.lang.Object> tagCache
View.getTag()AbstractProcessorpublic SoloProcessor(RobotiumTestRunner robotiumTestrunner)
protected boolean checkSolo()
RobotiumTestRunnerRobotiumTestRunner.getSolo()public void processProperties(java.util.Properties props)
processProperties in interface ProcessorInterfaceprocessProperties in class AbstractProcessorprops - The Properties object containing the in and out parametersProcessorInterface.processProperties(Properties)protected void startMainLauncher(java.util.Properties props)
throws ProcessorException
Solo object of RobotiumTestRunnerprops - The Properties object containing the in and out parametersProcessorExceptionRobotiumTestRunner.launchApplication()void assertCurrentActivity(java.util.Properties props)
throws ProcessorException
calling:
Solo.assertCurrentActivity(String, Class)
Solo#assertCurrentActivity(String, Class, boolean)
Solo#assertCurrentActivity(String, String))
Solo#assertCurrentActivity(String, String, boolean))
props - The Properties object containing the in and out parametersProcessorExceptionvoid assertMemoryNotLow(java.util.Properties props)
calling:
Solo.assertMemoryNotLow()
props - The Properties object containing the in and out parametersvoid clearEditText(java.util.Properties props)
throws ProcessorException
EditText
calling:
Solo.clearEditText(EditText)
Solo.clearEditText(int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid handleComandWithoutParams(java.util.Properties props)
calling:
Solo.clearLog() Requires Robotium4.1+
Solo.stopScreenshotSequence() Requires Robotium4.2
Solo.clickOnActionBarHomeButton() Robotium 3.4.1
Solo.unlockScreen() Robotium 5.2.1
props - The Properties object containing the in and out parametersvoid clickInList(java.util.Properties props,
boolean longtime)
throws ProcessorException
calling:
Solo.clickInList(int)
Solo.clickInList(int, int)
Solo.clickLongInList(int)
Solo.clickLongInList(int, int)
Solo.clickLongInList(int, int, int)
props - The Properties object containing the in and out parameterslongtime - Boolean, if a long-time click should be performed.ProcessorExceptionvoid clickOnScreen(java.util.Properties props,
boolean longtime)
throws ProcessorException
calling:
Solo.clickOnScreen(float, float)
Solo.clickLongOnScreen(float, float)
Solo.clickLongOnScreen(float, float, int)
Solo.clickOnScreen(float, float, int) Requires Robotium4.1+
props - The Properties object containing the in and out parameterslongtime - Boolean, if a long-time click should be performed.ProcessorExceptionvoid clickOnActionBarItem(java.util.Properties props)
throws ProcessorException
calling:
Solo.clickOnActionBarItem(int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid clickOnText(java.util.Properties props,
boolean longtime)
throws ProcessorException
calling:
Solo.clickOnText(String)
Solo.clickOnText(String, int)
Solo.clickOnText(String, int, boolean)
Solo.clickLongOnText(String)
Solo.clickLongOnText(String, int)
Solo.clickLongOnText(String, int, boolean)
Solo.clickLongOnText(String, int, int)
Solo.clickLongOnTextAndPress(String, int)
props - The Properties object containing the in and out parameterslongtime - Boolean, if a long-time click should be performed.ProcessorExceptionvoid clickOnView(java.util.Properties props,
boolean longtime)
throws ProcessorException
ViewviewCache and click on it.clickOnViewByIndex(Properties)
calling:
Solo.clickOnView(View)
Solo.clickOnView(View, boolean) -- Robotium 4.1
Solo.clickLongOnView(View)
Solo.clickLongOnView(View, int)
props - The Properties object containing the in and out parameterslongtime - Boolean, if a long-time click should be performed.ProcessorExceptionSolo.clickOnView(View)void clickOnViewByName(java.util.Properties props)
throws ProcessorException
TextView by nameButtonToggleButtonclickOnView(Properties, boolean)
calling:
Solo.clickOnButton(String)
Solo.clickOnToggleButton(String)
props - The Properties object containing the in and out parametersProcessorExceptionvoid clickOnViewByIndex(java.util.Properties props)
throws ProcessorException
TextView by indexCheckBoxEditTextImageViewImageButtonRadioButtonButtonclickOnView(Properties, boolean)
calling:
Solo.clickOnCheckBox(int)
Solo.clickOnEditText(int)
Solo.clickOnImage(int)
Solo.clickOnImageButton(int)
Solo.clickOnRadioButton(int)
Solo.clickOnButton(int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid clickOnMenuItem(java.util.Properties props,
boolean subMenu)
throws ProcessorException
calling:
Solo.clickOnMenuItem(String)
Solo.clickOnMenuItem(String, boolean)
props - The Properties object containing the in and out parametersProcessorExceptionvoid drag(java.util.Properties props) throws ProcessorException
calling:
Solo.drag(float, float, float, float, int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid enterText(java.util.Properties props)
throws ProcessorException
EditText
calling:
Solo.enterText(int, String)
Solo.enterText(EditText, String)
Solo.typeText(int, String) -- Robotium 3.6
Solo.typeText(EditText, String) -- Robotium 3.6
props - The Properties object containing the in and out parametersProcessorExceptionvoid finalizeRemoteSolo(java.util.Properties props)
calling:
Solo.finalize()
props - The Properties object containing the in and out parametersvoid finishOpenedActivities(java.util.Properties props)
calling:
Solo.finishOpenedActivities()
props - The Properties object containing the in and out parametersvoid getActivityMonitor(java.util.Properties props)
throws ProcessorException
calling:
Solo.getActivityMonitor()
props - The Properties object containing the in and out parametersProcessorExceptionvoid getAllOpenActivities(java.util.Properties props)
throws ProcessorException
calling:
Solo#getAllOpenedActivities()
props - The Properties object containing the in and out parametersProcessorExceptionvoid getCurrentActivity(java.util.Properties props)
throws ProcessorException
Upon success the resultProperties should contain:
PARAM_CLASS=full Classname of the Activity, and
PARAM_NAME=Local (short) classname of the Activity.
calling:
Solo.getCurrentActivity()
props - The Properties object containing the in and out parametersProcessorExceptionvoid getCurrentViews(java.util.Properties props)
throws ProcessorException
Views of following type:ButtonCheckBoxDatePickerEditTextGridViewImageButtonImageViewListViewProgressBarRadioButtonScrollViewSlidingDrawerSpinnerTextViewTimePickerToggleButtonView
calling:
Solo.getViews() - Robotium 4.1
Solo.getCurrentViews() - Robotium 4.1
Solo.getCurrentViews(Class) - Robotium 4.1
Solo.getCurrentViews(Class, View) - Robotium 4.1
Solo.getCurrentViews(Class, boolean) - Robotium 5.2.1
Solo.getCurrentViews(Class, boolean, View) - Robotium 5.2.1
props - The Properties object containing the in and out parametersProcessorExceptionvoid getCurrentWebElements(java.util.Properties props)
throws ProcessorException
calling:
Solo.getCurrentWebElements() -- Robotium 4.1
Solo.getCurrentWebElements(By) -- Robotium 4.1
Solo.getWebElements() -- Robotium 5.1
Solo.getWebElements(By) -- Robotium 5.1
Solo.getWebElement(By, int) -- Robotium 4.1
props - The Properties object containing the in and out parametersProcessorExceptionvoid getViewById(java.util.Properties props)
throws ProcessorException
View by id (R.id)
calling:
getViewById(int, Class)
getViewById(int, int, Class)
props - The Properties object containing the in and out parametersProcessorExceptionvoid getViewByName(java.util.Properties props)
throws ProcessorException
View by resource idname. Requires Robotium4.1+
calling:
Solo.getView(String)
Solo.getView(String, int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid getViewByTag(java.util.Properties props)
throws ProcessorException
View by Tag Object. Requires Robotium 5.3.0+
calling:
Solo.getView(Object)
Solo.getView(Object, int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid getViewByIndex(java.util.Properties props)
throws ProcessorException
TextView by indexButtonEditTextTextViewImageViewImageButton
calling:
Solo.getButton(int)
Solo.getEditText(int)
Solo.getImage(int)
Solo.getImageButton(int)
Solo.getText(int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid getViewByText(java.util.Properties props)
throws ProcessorException
TextView by textButtonEditTextTextView
calling:
Solo.getButton(String)
Solo.getButton(String, boolean)
Solo#getEditBox(String)
Solo#getEditBox(String, boolean)
Solo.getText(String)
Solo.getText(String, boolean)
props - The Properties object containing the in and out parametersProcessorExceptionvoid getViewsInParent(java.util.Properties props)
throws ProcessorException
Message.PARAM_REFERENCE
calling:
Solo.getViews(View)
ProcessorExceptionvoid getString(java.util.Properties props)
throws ProcessorException
Message.PARAM_RESID or Message.PARAM_ID
calling:
Solo.getString(int)
Solo.getString(String)
ProcessorExceptionvoid getTopParent(java.util.Properties props)
throws ProcessorException
Message.PARAM_REFERENCE
calling:
Solo.getView(int)
Solo.getTopParent(View)
ProcessorExceptionvoid goBack(java.util.Properties props)
throws ProcessorException
calling:
Solo.goBack()
ProcessorExceptionvoid goBackToActivity(java.util.Properties props)
throws ProcessorException
calling:
Solo.goBackToActivity(String)
ProcessorExceptionvoid isViewByIndexChecked(java.util.Properties props)
throws ProcessorException
TextView is checked.CheckBoxRadioButtonSpinnerToggleButton
calling:
Solo.isCheckBoxChecked(int)
Solo.isRadioButtonChecked(int)
Solo.isSpinnerTextSelected(int, String)
Solo.isToggleButtonChecked(int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid isViewByTextChecked(java.util.Properties props)
throws ProcessorException
TextView is checked.CheckBoxRadioButtonSpinnerToggleButton
calling:
Solo.isCheckBoxChecked(String)
Solo.isRadioButtonChecked(String)
Solo.isSpinnerTextSelected(String)
Solo.isTextChecked(String)
Solo.isToggleButtonChecked(String)
props - The Properties object containing the in and out parametersProcessorExceptionvoid pressSoftKeyboardNextButton(java.util.Properties props)
calling:
Solo.pressSoftKeyboardNextButton()
props - The Properties object containing the in and out parametersvoid pressSoftKeyboardSearchButton(java.util.Properties props)
calling:
Solo.pressSoftKeyboardSearchButton()
props - The Properties object containing the in and out parametersvoid pressMenuItem(java.util.Properties props)
throws ProcessorException
android.widget.Menu
calling:
Solo.pressMenuItem(int)
Solo.pressMenuItem(int, int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid pressSpinnerItem(java.util.Properties props)
throws ProcessorException
Spinner
calling:
Solo.pressSpinnerItem(int, int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid scroll(java.util.Properties props)
throws ProcessorException
calling:
Solo.scrollDown()
Solo.scrollDownList(int)
Solo.scrollDownList(AbsListView) -- Robotium 3.6
Solo.scrollUp()
Solo.scrollToTop() -- Robotium 3.4.1
Solo.scrollToBottom() -- Robotium 3.4.1
Solo.scrollUpList(int)
Solo.scrollUpList(AbsListView) -- Robotium 3.6
Solo.scrollListToTop(int) -- Robotium 3.4.1
Solo.scrollListToTop(AbsListView) -- Robotium 3.6
Solo.scrollListToBottom(int) -- Robotium 3.4.1
Solo.scrollListToBottom(AbsListView) -- Robotium 3.6
Solo.scrollListToLine(AbsListView, int) -- Robotium 3.6
Solo.scrollListToLine(int, int) -- Robotium 3.6
props - The Properties object containing the in and out parametersProcessorExceptionvoid scrollToSide(java.util.Properties props)
throws ProcessorException
calling:
Solo.scrollToSide(int)
Solo.scrollViewToSide(View, int) -- Robotium 3.6
Solo.scrollToSide(int, float) -- Robotium 4.3
Solo.scrollToSide(int, float, int) -- Robotium 5.2.1
Solo.scrollViewToSide(View, int, float) -- Robotium 4.3
Solo.scrollViewToSide(View, int, float, int) -- Robotium 5.2.1
props - The Properties object containing the in and out parametersProcessorExceptionvoid searchView(java.util.Properties props)
throws ProcessorException
ButtonEditTextTextViewToggleButton
calling:
Solo.searchButton(String)
Solo.searchButton(String, boolean)
Solo.searchButton(String, int)
Solo.searchButton(String, int, boolean)
Solo.searchEditText(String)
Solo.searchText(String)
Solo.searchText(String, boolean)
Solo.searchText(String, int)
Solo.searchText(String, int, boolean)
Solo.searchToggleButton(String)
Solo.searchToggleButton(String, int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid sendKey(java.util.Properties props)
throws ProcessorException
calling:
Solo.sendKey(int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid setActivityOrientation(java.util.Properties props)
throws ProcessorException
calling:
Solo.setActivityOrientation(int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid setDatePicker(java.util.Properties props)
throws ProcessorException
DatePicker.
calling:
Solo.setDatePicker(DatePicker, int, int, int)
Solo.setDatePicker(int, int, int, int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid setMobileData(java.util.Properties props)
throws ProcessorException
calling:
Solo.setMobileData(Boolean) -- Robotium 5.3.1
props - The Properties object containing the in and out parametersProcessorExceptionvoid setWiFiData(java.util.Properties props)
throws ProcessorException
calling:
Solo.setWiFiData(Boolean) -- Robotium 5.3.1
props - The Properties object containing the in and out parametersProcessorExceptionvoid setProgressBar(java.util.Properties props)
throws ProcessorException
ProgressBar.
calling:
Solo.setProgressBar(int, int)
Solo.setProgressBar(ProgressBar, int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid setNavigationDrawer(java.util.Properties props)
throws ProcessorException
NavigationDrawer.
Examples of status are: Solo.CLOSED and Solo.OPENED.
calling:
Solo.setNavigationDrawer(int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid setSlidingDrawer(java.util.Properties props)
throws ProcessorException
SlidingDrawer.
calling:
Solo.setSlidingDrawer(int, int)
Solo.setSlidingDrawer(android.widget.SlidingDrawer, int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid setTimePicker(java.util.Properties props)
throws ProcessorException
TimePicker.
calling:
Solo.setTimePicker(int, int, int)
Solo.setTimePicker(android.widget.TimePicker, int, int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid sleep(java.util.Properties props)
throws ProcessorException
calling:
Solo.sleep(int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid waitForActivity(java.util.Properties props)
throws ProcessorException
Activity.
calling:
Solo.waitForActivity(String)
Solo.waitForActivity(String, int)
Solo.waitForActivity(Class) -- Robotium 4.1
Solo.waitForActivity(Class, int) -- Robotium 4.1
props - The Properties object containing the in and out parametersProcessorExceptionvoid waitForFragmentByTag(java.util.Properties props)
throws ProcessorException
calling:
Solo.waitForFragmentByTag(String, int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid waitForEmptyActivityStack(java.util.Properties props)
throws ProcessorException
calling:
Solo.waitForEmptyActivityStack(int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid waitForFragmentById(java.util.Properties props)
throws ProcessorException
calling:
Solo.waitForFragmentById(int, int)
props - The Properties object containing the in and out parametersProcessorExceptionvoid waitForDialog(java.util.Properties props)
throws ProcessorException
Dialog to close/open.
calling:
Solo.waitForDialogToClose(long)
Solo.waitForDialogToOpen(long) -- Robotium 4.1
props - The Properties object containing the in and out parametersProcessorExceptionvoid waitForText(java.util.Properties props)
throws ProcessorException
TextView.
calling:
Solo.waitForText(String)
Solo#waitForText(String, int, long))
Solo#waitForText(String, int, long, boolean))
Solo#waitForText(String, int, long, boolean, boolean))
props - The Properties object containing the in and out parametersProcessorExceptionvoid waitForLogMessage(java.util.Properties props)
throws ProcessorException
calling:
Solo.waitForLogMessage(String)
props - The Properties object containing the in and out parametersProcessorExceptionvoid waitForView(java.util.Properties props)
throws ProcessorException
View.
calling:
Solo.waitForView(Class)
Solo#waitForView(Class, int, int))
Solo#waitForView(Class, int, int, boolean))
props - The Properties object containing the in and out parametersProcessorExceptionvoid waitForViewByTag(java.util.Properties props)
throws ProcessorException
View.
calling:
Solo.waitForView(Object) Since Robotium5.3.1
Solo.waitForView(Object, int, int) Since Robotium5.3.1
Solo.waitForView(Object, int, int, boolean) Since Robotium5.3.1
props - The Properties object containing the in and out parametersProcessorExceptionvoid waitForViewUID(java.util.Properties props)
throws ProcessorException
View.
calling:
Solo.waitForView(View)
Solo#waitForView(View, int, boolean))
props - The Properties object containing the in and out parametersProcessorExceptionvoid getTagForView(java.util.Properties props)
throws ProcessorException
tagCache.props - The Properties object containing the in and out parametersProcessorExceptionvoid waitForViewByID(java.util.Properties props)
throws ProcessorException
View according to ID (R.id) Requires Robotium4.1+
calling:
Solo.waitForView(int)
Solo.waitForView(int, int, int)
Solo.waitForView(int, int, int, boolean)
props - The Properties object containing the in and out parametersProcessorExceptionvoid waitForWebElement(java.util.Properties props)
throws ProcessorException
WebElement. -- Robotium 4.1
calling:
Solo.waitForWebElement(By) -- Robotium 4.1
Solo.waitForWebElement(By, int, boolean) -- Robotium 4.1
Solo.waitForWebElement(By, int, int, boolean) -- Robotium 4.1
props - The Properties object containing the in and out parametersProcessorExceptionvoid getScreenSize(java.util.Properties props)
throws ProcessorException
props - The Properties object containing the in and out parametersProcessorExceptionvoid getViewLocation(java.util.Properties props)
throws ProcessorException
props - The Properties object containing the in and out parametersProcessorExceptionvoid getTextViewValue(java.util.Properties props)
throws ProcessorException
props - The Properties object containing the in and out parametersProcessorExceptionvoid waitForCondition(java.util.Properties props)
throws ProcessorException
calling:
Solo.waitForCondition(Condition, int) -- Robotium 4.1
props - The Properties object containing the in and out parameterstrue if condition is satisfied;
false if it is not satisfied or the timeout is reached.ProcessorExceptionvoid clearTextInWebElement(java.util.Properties props)
throws ProcessorException
calling:
Solo.clearTextInWebElement(By) -- Robotium 4.1
props - The Properties object containing the in and out parametersBy.id("id") and By.name("name").ProcessorExceptionvoid clickOnWebElement(java.util.Properties props)
throws ProcessorException
calling:
Solo.clickOnWebElement(By) -- Robotium 4.1
Solo.clickOnWebElement(By, int) -- Robotium 4.1
Solo.clickOnWebElement(By, int, boolean) -- Robotium 4.1
props - The Properties object containing the in and out parametersBy.id("id") and By.name("name").ProcessorExceptionvoid clickOnWebElementByUID(java.util.Properties props)
throws ProcessorException
calling:
Solo.clickOnWebElement(WebElement) -- Robotium 4.1
props - The Properties object containing the in and out parametersProcessorExceptionvoid enterTextInWebElement(java.util.Properties props)
throws ProcessorException
calling:
Solo.enterTextInWebElement(By, String) -- Robotium 4.1
Solo.typeTextInWebElement(By, String) -- Robotium 4.1
Solo.typeTextInWebElement(By, String, int) -- Robotium 4.1
props - The Properties object containing the in and out parametersBy.id("id") and By.name("name").ProcessorExceptionvoid typeTextInWebElementByUID(java.util.Properties props)
throws ProcessorException
calling:
Solo.typeTextInWebElement(WebElement, String) -- Robotium 4.1
props - The Properties object containing the in and out parametersProcessorExceptionvoid getGuiImage(java.util.Properties props)
throws ProcessorException
ProcessorException will be thrown out.uid - String, This is the view's uid according to which we will get a View.
This uid is the key in local cache viewCacheProcessorExceptionprotected android.graphics.Bitmap getBitmapOfView(android.view.View view)
View.getDrawingCache() to get the bitmap image.view - View, The View objectvoid getViewClassName(java.util.Properties props)
throws ProcessorException
getObjectClassName(Properties, boolean) insteadProcessorException will be thrown out.uid - String, This is the view's uid according to which we will get a View.
This uid is the key in local cache viewCacheProcessorExceptionvoid getObjectClassName(java.util.Properties props,
boolean isViewObject)
throws ProcessorException
ProcessorException will be thrown out.uid - String, This is the object's uid according to which we will get the object.
This uid is the key in local cache viewCache or activityCache
or webElementCacheProcessorExceptionvoid startScreenshotSequenceMax(java.util.Properties props)
calling:
Solo.startScreenshotSequence(String,int,int,int)
props - The Properties object containing the in and out parametersvoid getScreenshotSequence(java.util.Properties props)
These screenshots are generated by calling:
Solo.startScreenshotSequence(String) -- Robotium 4.1+
Solo.startScreenshotSequence(String, int, int, int) -- Robotium 4.1+
props - The Properties object containing the in and out parametersvoid takeScreenshot(java.util.Properties props)
calling:
Solo.takeScreenshot(String)
Solo.takeScreenshot(String, int) -- Robotium 4.1
props - The Properties object containing the in and out parametersjava.lang.String getImageBase64EncodedString(java.lang.String filename,
java.lang.StringBuffer absoluteFilePath)
throws ProcessorException
filename, - String, in, the image file to read from mobile device.absoluteFilePath, - StringBuffer, out, the absolute name of the image file.ProcessorExceptiongetImageBase64EncodedString(String, StringBuffer, long)java.lang.String getImageBase64EncodedString(java.lang.String filename,
java.lang.StringBuffer absoluteFilePath,
long newerThan)
throws ProcessorException
filename, - String, in, the image file to read from mobile device.absoluteFilePath, - StringBuffer, out, the absolute name of the image file.newerThan, - long, in, the time to compare with the file's last modified time,
if 'last modified time' is smaller than it, the file will not be read.ProcessorExceptiongetImageBase64EncodedString(String, StringBuffer)void handleRobotiumUtilsCommand(java.util.Properties props)
calling:
RobotiumUtils.filterViews(Class, Iterable) -- Robotium 4.1
RobotiumUtils.filterViewsByText(Iterable, java.util.regex.Pattern) -- Robotium 4.1
RobotiumUtils.filterViewsByText(Iterable, String) -- Robotium 4.1
RobotiumUtils.filterViewsToSet(Class[], Iterable) -- Robotium 4.1
RobotiumUtils.sortViewsByLocationOnScreen(List) -- Robotium 4.1
RobotiumUtils.sortViewsByLocationOnScreen(List, boolean) -- Robotium 4.1
RobotiumUtils.getNumberOfMatches(String, TextView, java.util.Set) -- Robotium 4.1
props - The Properties object containing the in and out parametersvoid handleRobotiumTimeoutCommand(java.util.Properties props)
calling:
Timeout.setLargeTimeout(int) -- Robotium 4.1+
Timeout.setSmallTimeout(int) -- Robotium 4.1+
Timeout.getLargeTimeout() -- Robotium 4.1+
Timeout.getSmallTimeout() -- Robotium 4.1+
props - The Properties object containing the in and out parametersvoid handleZoomRotateSwipe(java.util.Properties props)
calling:
Solo.pinchToZoom(PointF, PointF, PointF, PointF) -- Robotium 4.1+
{@link Solo#rotateLarge(PointF, PointF) -- Robotium 4.1+
{@link Solo#rotateSmall(PointF, PointF) -- Robotium 4.1+
{@link Solo#swipe(PointF, PointF, PointF, PointF) -- Robotium 4.1+
props - The Properties object containing the in and out parametersvoid handleConfigTimeoutCommands(java.util.Properties props)
calling:
Solo.Config.timeout_small
Solo.Config.timeout_large
props - The Properties object containing the in and out parametersvoid handleConfigShouldScrollCommands(java.util.Properties props)
calling:
Solo.Config.shouldScroll
props - The Properties object containing the in and out parametersvoid handleConfigUseJavaScriptToClickWebElementsCommands(java.util.Properties props)
calling:
Solo.Config.useJavaScriptToClickWebElements
props - The Properties object containing the in and out parametersvoid handleConfigScreenshotSavePathCommands(java.util.Properties props)
calling:
Solo.Config.screenshotSavePath
props - The Properties object containing the in and out parametersvoid handleConfigScreenshotFileTypeCommands(java.util.Properties props)
calling:
Solo.Config.screenshotFileType
props - The Properties object containing the in and out parameterspublic java.lang.Object getCachedObject(java.lang.String key,
boolean useChain)
getCachedObject in interface CacheReferenceInterfacekey - -- String key for identifying the object stored in cache.useChain - -- true if the instance should search in all chained caches,
false if only the individual local cache should be searched.public void addCacheReferenceInterface(CacheReferenceInterface cache)
addCacheReferenceInterface in interface CacheReferenceInterfaceCacheReferenceInterface.addCacheReferenceInterface(CacheReferenceInterface)public void removeCacheReferenceInterface(CacheReferenceInterface cache)
removeCacheReferenceInterface in interface CacheReferenceInterfaceCacheReferenceInterface.removeCacheReferenceInterface(CacheReferenceInterface)public void clearCache(boolean useChain)
clearCache in interface CacheReferenceInterfaceuseChain - -- true if the instance should clear all chained caches,
false if only the individual local cache should be cleared.CacheReferenceInterface.clearCache(boolean)Copyright © SAS Institute. All Rights Reserved.