public class RobotiumUtils
extends java.lang.Object
Usage:
RobotiumUtils utils = new RobotiumUtils(solo);
| Constructor and Description |
|---|
RobotiumUtils(Solo solo) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List |
filterViews(java.lang.String className,
java.util.List<java.lang.String> viewUIDList)
Filters Views based on the given class type.
|
java.util.List |
filterViewsByText(java.util.List<java.lang.String> viewUIDList,
java.lang.String regex)
Filters a collection of Views and returns a list that contains only Views
with text that matches a specified regular expression.
|
java.util.List |
filterViewsToSet(java.util.List<java.lang.String> classNameList,
java.util.List<java.lang.String> viewUIDList)
Filters all Views not within the given set.
|
int |
getNumberOfMatches(java.lang.String regex,
java.lang.String textViewUID,
java.util.Set<java.lang.String> matchedViewUIDList)
Checks if a View matches a certain string and returns the amount of total matches.
|
java.util.List |
removeInvisibleViews(java.util.List<java.lang.String> viewUIDList)
Removes invisible Views.
|
void |
sortViewsByLocationOnScreen(java.util.List<java.lang.String> viewUIDList)
Orders Views by their location on-screen.
|
void |
sortViewsByLocationOnScreen(java.util.List<java.lang.String> viewUIDList,
boolean yAxisFirst)
Orders Views by their location on-screen.
|
public RobotiumUtils(Solo solo)
public java.util.List filterViews(java.lang.String className,
java.util.List<java.lang.String> viewUIDList)
throws java.lang.IllegalThreadStateException,
RemoteException,
java.util.concurrent.TimeoutException,
ShutdownInvocationException
className, - String, the class to filterviewUIDList, - LIst, the list of UID for views to filter fromjava.lang.IllegalThreadStateExceptionRemoteExceptionjava.util.concurrent.TimeoutExceptionShutdownInvocationExceptionpublic java.util.List filterViewsByText(java.util.List<java.lang.String> viewUIDList,
java.lang.String regex)
throws java.lang.IllegalThreadStateException,
RemoteException,
java.util.concurrent.TimeoutException,
ShutdownInvocationException
viewUIDList, - List The collection of UID for views to scan.regex - The text pattern to search for.java.lang.IllegalThreadStateExceptionRemoteExceptionjava.util.concurrent.TimeoutExceptionShutdownInvocationExceptionpublic java.util.List filterViewsToSet(java.util.List<java.lang.String> classNameList,
java.util.List<java.lang.String> viewUIDList)
throws java.lang.IllegalThreadStateException,
RemoteException,
java.util.concurrent.TimeoutException,
ShutdownInvocationException
classNameList, - List, contains 'full qualified class name' for all classes that are OK to pass the filterviewList, - List, the list of UID for views to filter fromjava.lang.IllegalThreadStateExceptionRemoteExceptionjava.util.concurrent.TimeoutExceptionShutdownInvocationExceptionpublic int getNumberOfMatches(java.lang.String regex,
java.lang.String textViewUID,
java.util.Set<java.lang.String> matchedViewUIDList)
throws java.lang.IllegalThreadStateException,
RemoteException,
java.util.concurrent.TimeoutException,
ShutdownInvocationException
regex, - String, the regex to matchtextViewUID, - String, the UID for view to checkmatchedViewUIDList, - Set, set of UID for views that have matchedjava.lang.IllegalThreadStateExceptionRemoteExceptionjava.util.concurrent.TimeoutExceptionShutdownInvocationExceptionpublic java.util.List removeInvisibleViews(java.util.List<java.lang.String> viewUIDList)
throws java.lang.IllegalThreadStateException,
RemoteException,
java.util.concurrent.TimeoutException,
ShutdownInvocationException
viewUIDList - an Iterable with UID for Views that are being checked for invisible Views.java.lang.IllegalThreadStateExceptionRemoteExceptionjava.util.concurrent.TimeoutExceptionShutdownInvocationExceptionpublic void sortViewsByLocationOnScreen(java.util.List<java.lang.String> viewUIDList)
throws java.lang.IllegalThreadStateException,
RemoteException,
java.util.concurrent.TimeoutException,
ShutdownInvocationException
viewUIDList, - List, a list of UID for the views to sort.java.lang.IllegalThreadStateExceptionRemoteExceptionjava.util.concurrent.TimeoutExceptionShutdownInvocationExceptionpublic void sortViewsByLocationOnScreen(java.util.List<java.lang.String> viewUIDList,
boolean yAxisFirst)
throws java.lang.IllegalThreadStateException,
RemoteException,
java.util.concurrent.TimeoutException,
ShutdownInvocationException
viewUIDList, - List, a list of UID for the views to sort.yAxisFirst - Whether the y-axis should be compared before the x-axis.java.lang.IllegalThreadStateExceptionRemoteExceptionjava.util.concurrent.TimeoutExceptionShutdownInvocationExceptionCopyright © SAS Institute. All Rights Reserved.