|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jayway.android.robotium.remotecontrol.client.processor.AbstractProcessor
com.jayway.android.robotium.remotecontrol.client.processor.SoloProcessor
public class SoloProcessor
This class is used to process the "remote command" from the robotium-remote-control
The input parameters are in a Properties object, and the results will be put into
that properties object, which will be sent back to robotium-remote-control
They will be in key-value format in the properties object.
The key is defined as constant in SoloMessage
Refer to the following page to know what key to get and what key to set for each "command"
http://safsdev.sourceforge.net/doc/com/jayway/android/robotium/remotecontrol/solo/Solo.html
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
| Field Summary | |
|---|---|
protected java.util.Hashtable<java.lang.String,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,ActivityMonitor> |
activityMonitorCache
local cache for containing the ActivityMonitor
Note: Don't manipulate it directly like activityMonitorCache.get(key) etc.Use the cache-manipulation-methods defined in AbstractProcessor |
static java.lang.String |
TAG
|
protected java.util.Hashtable<java.lang.String,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 |
| Fields inherited from class com.jayway.android.robotium.remotecontrol.client.processor.AbstractProcessor |
|---|
INITIAL_CACHE_SIZE, remoteCommand, testRunner |
| Constructor Summary | |
|---|---|
SoloProcessor(RobotiumTestRunner robotiumTestrunner)
|
|
| Method Summary | |
|---|---|
void |
addCacheReferenceInterface(CacheReferenceInterface cache)
CacheReferenceInterface implementation. |
protected boolean |
checkSolo()
Test if the solo is null. |
void |
clearCache(boolean useChain)
CacheReferenceInterface implementation. |
protected Bitmap |
getBitmapOfView(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. |
void |
processProperties(java.util.Properties props)
Before calling this method, you should call setRemoteCommand() |
void |
removeCacheReferenceInterface(CacheReferenceInterface cache)
CacheReferenceInterface implementation. |
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. |
| Methods inherited from class com.jayway.android.robotium.remotecontrol.client.processor.AbstractProcessor |
|---|
convertToDelimitedString, convertToKey, convertToKeys, convertToKeys, debug, getCachedItem, getStackTrace, getUniqueSeparator, makeUniqueCacheKey, processMessage, putCachedItem, removeCachedItem, resetExternalModeCache, setGeneralError, setGeneralError, setGeneralErrorWithSpecialInfo, setGeneralErrorWithSpecialInfo, setGeneralSuccess, setGeneralSuccess, setGeneralSuccessWithSpecialInfo, setGeneralWarningWithSpecialInfo, setRemoteCommand, stringIsMatched |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String TAG
protected java.util.Hashtable<java.lang.String,ActivityMonitor> activityMonitorCache
ActivityMonitor
Note: Don't manipulate it directly like activityMonitorCache.get(key) etc.AbstractProcessor
AbstractProcessor.getCachedItem(Hashtable, Object),
AbstractProcessor.removeCachedItem(Hashtable, Object),
AbstractProcessor.putCachedItem(Hashtable, Object, Object)protected java.util.Hashtable<java.lang.String,Activity> activityCache
Activity
Note: Don't manipulate it directly like activityCache.get(key) etc.AbstractProcessor
AbstractProcessor.getCachedItem(Hashtable, Object),
AbstractProcessor.removeCachedItem(Hashtable, Object),
AbstractProcessor.putCachedItem(Hashtable, Object, Object)protected java.util.Hashtable<java.lang.String,View> viewCache
View
Note: Don't manipulate it directly like viewCache.get(key) etc.AbstractProcessor
AbstractProcessor.getCachedItem(Hashtable, Object),
AbstractProcessor.removeCachedItem(Hashtable, Object),
AbstractProcessor.putCachedItem(Hashtable, Object, Object)| Constructor Detail |
|---|
public SoloProcessor(RobotiumTestRunner robotiumTestrunner)
| Method Detail |
|---|
protected boolean checkSolo()
RobotiumTestRunner
RobotiumTestRunner.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 RobotiumTestRunner
props - The Properties object containing the in and out parameters
ProcessorExceptionRobotiumTestRunner.launchApplication()protected Bitmap getBitmapOfView(View view)
View#getDrawingCache() to get the bitmap image.
view - View, The View object
public 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)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||