@Deprecated public class UiSelector extends Object
Constructor and Description |
---|
UiSelector()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
UiSelector |
checkable(boolean val)
Deprecated.
Set the search criteria to match widgets that are checkable.
|
UiSelector |
checked(boolean val)
Deprecated.
Set the search criteria to match widgets that
are currently checked (usually for checkboxes).
|
UiSelector |
childSelector(UiSelector selector)
Deprecated.
Adds a child UiSelector criteria to this selector.
|
<T> UiSelector |
className(Class<T> type)
Deprecated.
Set the search criteria to match the class property
for a widget (for example, "android.widget.Button").
|
UiSelector |
className(String className)
Deprecated.
Set the search criteria to match the class property
for a widget (for example, "android.widget.Button").
|
UiSelector |
classNameMatches(String regex)
Deprecated.
Set the search criteria to match the class property
for a widget, using a regular expression.
|
UiSelector |
clickable(boolean val)
Deprecated.
Set the search criteria to match widgets that are clickable.
|
protected UiSelector |
cloneSelector()
Deprecated.
|
UiSelector |
description(String desc)
Deprecated.
Set the search criteria to match the content-description
property for a widget.
|
UiSelector |
descriptionContains(String desc)
Deprecated.
Set the search criteria to match the content-description
property for a widget.
|
UiSelector |
descriptionMatches(String regex)
Deprecated.
Set the search criteria to match the content-description
property for a widget.
|
UiSelector |
descriptionStartsWith(String desc)
Deprecated.
Set the search criteria to match the content-description
property for a widget.
|
UiSelector |
enabled(boolean val)
Deprecated.
Set the search criteria to match widgets that are enabled.
|
UiSelector |
focusable(boolean val)
Deprecated.
Set the search criteria to match widgets that are focusable.
|
UiSelector |
focused(boolean val)
Deprecated.
Set the search criteria to match widgets that have focus.
|
UiSelector |
fromParent(UiSelector selector)
Deprecated.
Adds a child UiSelector criteria to this selector which is used to
start search from the parent widget.
|
UiSelector |
index(int index)
Deprecated.
Set the search criteria to match the widget by its node
index in the layout hierarchy.
|
UiSelector |
instance(int instance)
Deprecated.
Set the search criteria to match the
widget by its instance number.
|
UiSelector |
longClickable(boolean val)
Deprecated.
Set the search criteria to match widgets that are long-clickable.
|
UiSelector |
packageName(String name)
Deprecated.
Set the search criteria to match the package name
of the application that contains the widget.
|
UiSelector |
packageNameMatches(String regex)
Deprecated.
Set the search criteria to match the package name
of the application that contains the widget.
|
UiSelector |
resourceId(String id)
Deprecated.
Set the search criteria to match the given resource ID.
|
UiSelector |
resourceIdMatches(String regex)
Deprecated.
Set the search criteria to match the resource ID
of the widget, using a regular expression.
|
UiSelector |
scrollable(boolean val)
Deprecated.
Set the search criteria to match widgets that are scrollable.
|
UiSelector |
selected(boolean val)
Deprecated.
Set the search criteria to match widgets that
are currently selected.
|
UiSelector |
text(String text)
Deprecated.
Set the search criteria to match the visible text displayed
in a widget (for example, the text label to launch an app).
|
UiSelector |
textContains(String text)
Deprecated.
Set the search criteria to match the visible text in a widget
where the visible text must contain the string in your input argument.
|
UiSelector |
textMatches(String regex)
Deprecated.
Set the search criteria to match the visible text displayed in a layout
element, using a regular expression.
|
UiSelector |
textStartsWith(String text)
Deprecated.
Set the search criteria to match visible text in a widget that is
prefixed by the text parameter.
|
String |
toString()
Deprecated.
Returns a string representation of the object.
|
protected UiSelector cloneSelector()
public UiSelector text(String text)
text
- Value to matchpublic UiSelector textMatches(String regex)
regex
- a regular expressionpublic UiSelector textStartsWith(String text)
text
- Value to matchpublic UiSelector textContains(String text)
text
- Value to matchpublic UiSelector className(String className)
className
- Value to matchpublic UiSelector classNameMatches(String regex)
regex
- a regular expressionpublic <T> UiSelector className(Class<T> type)
type
- typepublic UiSelector description(String desc)
desc
- Value to matchpublic UiSelector descriptionMatches(String regex)
regex
- a regular expressionpublic UiSelector descriptionStartsWith(String desc)
desc
- Value to matchpublic UiSelector descriptionContains(String desc)
desc
- Value to matchpublic UiSelector resourceId(String id)
id
- Value to matchpublic UiSelector resourceIdMatches(String regex)
regex
- a regular expressionpublic UiSelector index(int index)
instance(int)
method.index
- Value to matchpublic UiSelector instance(int instance)
className(String)
matches the image
widget class, and enabled(boolean)
is true.
The code would look like this:
new UiSelector().className("android.widget.ImageView")
.enabled(true).instance(2);
instance
- Value to matchpublic UiSelector enabled(boolean val)
val
- Value to matchpublic UiSelector focused(boolean val)
val
- Value to matchpublic UiSelector focusable(boolean val)
val
- Value to matchpublic UiSelector scrollable(boolean val)
val
- Value to matchpublic UiSelector selected(boolean val)
val
- Value to matchpublic UiSelector checked(boolean val)
val
- Value to matchpublic UiSelector clickable(boolean val)
val
- Value to matchpublic UiSelector checkable(boolean val)
val
- Value to matchpublic UiSelector longClickable(boolean val)
val
- Value to matchpublic UiSelector childSelector(UiSelector selector)
selector
- public UiSelector fromParent(UiSelector selector)
selector
- public UiSelector packageName(String name)
name
- Value to matchpublic UiSelector packageNameMatches(String regex)
regex
- a regular expressionpublic String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())