java.lang.Object | |
↳ | android.support.test.uiautomator.BySelector |
A BySelector
specifies criteria for matching UI elements during a call to
findObject(BySelector)
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Sets the search criteria to match elements that are checkable or not checkable.
| |||||||||||
Sets the search criteria to match elements that are checked or unchecked.
| |||||||||||
Sets the class name criteria for matching.
| |||||||||||
Sets the class name criteria for matching.
| |||||||||||
Sets the class name criteria for matching.
| |||||||||||
Sets the class name criteria for matching.
| |||||||||||
Sets the search criteria to match elements that are clickable or not clickable.
| |||||||||||
Sets the search criteria to match elements that are at a certain depth.
| |||||||||||
Sets the search criteria to match elements that are in a range of depths.
| |||||||||||
Sets the content description criteria for matching.
| |||||||||||
Sets the content description criteria for matching.
| |||||||||||
Sets the content description criteria for matching.
| |||||||||||
Sets the content description criteria for matching.
| |||||||||||
Sets the content description criteria for matching.
| |||||||||||
Sets the search criteria to match elements that are enabled or disabled.
| |||||||||||
Sets the search criteria to match elements that are focusable or not focusable.
| |||||||||||
Sets the search criteria to match elements that are focused or unfocused.
| |||||||||||
Adds a child selector criteria for matching.
| |||||||||||
Adds a descendant selector criteria for matching.
| |||||||||||
Adds a descendant selector criteria for matching.
| |||||||||||
Sets the search criteria to match elements that are long clickable or not long clickable.
| |||||||||||
Sets the search criteria to match elements that are no more than a certain depth.
| |||||||||||
Sets the search criteria to match elements that are at least a certain depth.
| |||||||||||
Sets the application package name criteria for matching.
| |||||||||||
Sets the package name criteria for matching.
| |||||||||||
Sets the resource name criteria for matching.
| |||||||||||
Sets the resource name criteria for matching.
| |||||||||||
Sets the resource name criteria for matching.
| |||||||||||
Sets the search criteria to match elements that are scrollable or not scrollable.
| |||||||||||
Sets the search criteria to match elements that are selected or not selected.
| |||||||||||
Sets the text value criteria for matching.
| |||||||||||
Sets the text value criteria for matching.
| |||||||||||
Sets the text value criteria for matching.
| |||||||||||
Sets the text value criteria for matching.
| |||||||||||
Sets the text value criteria for matching.
| |||||||||||
Returns a
String representation of this BySelector .
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Sets the search criteria to match elements that are checkable or not checkable.
isCheckable | Whether to match elements that are checkable or elements that are not checkable. |
---|
BySelector
.
Sets the search criteria to match elements that are checked or unchecked.
isChecked | Whether to match elements that are checked or elements that are unchecked. |
---|
BySelector
.
Sets the class name criteria for matching. A UI element will be considered a match if its
full class name matches the className
Pattern
and all other criteria for this
selector are met.
className | The Pattern to be used for matching. |
---|
BySelector
.
Sets the class name criteria for matching. A UI element will be considered a match if its
class name exactly matches the className
parameter and all other criteria for
this selector are met. If className
starts with a period, it is assumed to be in the
android.widget
package.
className | The full class name value to match. |
---|
BySelector
.
Sets the class name criteria for matching. A UI element will be considered a match if its
class name matches clazz
and all other criteria for this selector are met.
clazz | The class to match. |
---|
BySelector
Sets the class name criteria for matching. A UI element will be considered a match if its
package and class name exactly match the packageName
and className
parameters
and all other criteria for this selector are met.
packageName | The package value to match. |
---|---|
className | The class name value to match. |
BySelector
.
Sets the search criteria to match elements that are clickable or not clickable.
isClickable | Whether to match elements that are clickable or elements that are not clickable. |
---|
BySelector
.
Sets the search criteria to match elements that are at a certain depth.
Sets the search criteria to match elements that are in a range of depths.
Sets the content description criteria for matching. A UI element will be considered a match
if its content description matches the contentDescription
Pattern
and all
other criteria for this selector are met.
contentDescription | The Pattern to be used for matching. |
---|
BySelector
.
Sets the content description criteria for matching. A UI element will be considered a match
if its content description exactly matches the contentDescription
parameter and all
other criteria for this selector are met.
contentDescription | The exact value to match. |
---|
BySelector
.
Sets the content description criteria for matching. A UI element will be considered a match
if its content description contains the substring
parameter and all other criteria
for this selector are met.
substring | The substring to match. |
---|
BySelector
.
Sets the content description criteria for matching. A UI element will be considered a match
if its content description ends with the substring
parameter and all other criteria
for this selector are met.
substring | The substring to match. |
---|
BySelector
.
Sets the content description criteria for matching. A UI element will be considered a match
if its content description starts with the substring
parameter and all other criteria
for this selector are met.
substring | The substring to match. |
---|
BySelector
.
Sets the search criteria to match elements that are enabled or disabled.
isEnabled | Whether to match elements that are enabled or elements that are disabled. |
---|
BySelector
.
Sets the search criteria to match elements that are focusable or not focusable.
isFocusable | Whether to match elements that are focusable or elements that are not focusable. |
---|
BySelector
.
Sets the search criteria to match elements that are focused or unfocused.
isFocused | Whether to match elements that are focused or elements that are unfocused. |
---|
BySelector
.
Adds a child selector criteria for matching. A UI element will be considered a match if it
has a child element (direct descendant) which matches the childSelector
and all
other criteria for this selector are met. If specified more than once, matches must be found
for all childSelector
s.
childSelector | The selector used to find a matching child element. |
---|
BySelector
.
Adds a descendant selector criteria for matching. A UI element will be considered a match if
it has a descendant element which matches the descendantSelector
and all other
criteria for this selector are met. If specified more than once, matches must be found for
all descendantSelector
s.
descendantSelector | The selector used to find a matching descendant element. |
---|---|
maxDepth | The maximum depth under the element to search the descendant. |
BySelector
.
Adds a descendant selector criteria for matching. A UI element will be considered a match if
it has a descendant element which matches the descendantSelector
and all other
criteria for this selector are met. If specified more than once, matches must be found for
all descendantSelector
s.
descendantSelector | The selector used to find a matching descendant element. |
---|
BySelector
.
Sets the search criteria to match elements that are long clickable or not long clickable.
isLongClickable | Whether to match elements that are long clickable or elements that are not long clickable. |
---|
BySelector
.
Sets the search criteria to match elements that are no more than a certain depth.
Sets the search criteria to match elements that are at least a certain depth.
Sets the application package name criteria for matching. A UI element will be considered a
match if its application package name exactly matches the applicationPackage
parameter and all other criteria for this selector are met.
applicationPackage | The exact value to match. |
---|
BySelector
.
Sets the package name criteria for matching. A UI element will be considered a match if its
application package name matches the applicationPackage
Pattern
and all other
criteria for this selector are met.
applicationPackage | The Pattern to be used for matching. |
---|
BySelector
.
Sets the resource name criteria for matching. A UI element will be considered a match if its
resource name exactly matches the resourceName
parameter and all other criteria for
this selector are met.
resourceName | The exact value to match. |
---|
BySelector
.
Sets the resource name criteria for matching. A UI element will be considered a match if its
resource name matches the resourceName
Pattern
and all other criteria for
this selector are met.
resourceName | The Pattern to be used for matching. |
---|
BySelector
.
Sets the resource name criteria for matching. A UI element will be considered a match if its
resource package and resource id exactly match the resourcePackage
and
resourceId
parameters and all other criteria for this selector are met.
resourcePackage | The resource package value to match. |
---|---|
resourceId | The resouce-id value to match. |
BySelector
.
Sets the search criteria to match elements that are scrollable or not scrollable.
isScrollable | Whether to match elements that are scrollable or elements that are not scrollable. |
---|
BySelector
.
Sets the search criteria to match elements that are selected or not selected.
isSelected | Whether to match elements that are selected or elements that are not selected. |
---|
BySelector
.
Sets the text value criteria for matching. A UI element will be considered a match if its
text value matches the textValue
Pattern
and all other criteria for this
selector are met.
textValue | The Pattern to be used for matching. |
---|
BySelector
.
Sets the text value criteria for matching. A UI element will be considered a match if its
text value exactly matches the textValue
parameter and all other criteria for this
selector are met.
textValue | The exact value to match. |
---|
BySelector
.
Sets the text value criteria for matching. A UI element will be considered a match if its
text value contains the substring
parameter and all other criteria for this selector
are met.
substring | The substring to match. |
---|
BySelector
.
Sets the text value criteria for matching. A UI element will be considered a match if its
text value ends with the substring
parameter and all other criteria for this selector
are met.
substring | The substring to match. |
---|
BySelector
.
Sets the text value criteria for matching. A UI element will be considered a match if its
text value starts with the substring
parameter and all other criteria for this
selector are met.
substring | The substring to match. |
---|
BySelector
.
Returns a String
representation of this BySelector
. The format is
"BySelector [<KEY>='<VALUE> ... ]". Each criteria is listed as a key-value pair
where the key is the name of the criteria expressed in all caps (e.g. CLAZZ, RES, etc).