A Uiselector object can be understood as a conditional object that describes a condition that can be used with UIObject to get a control object that matches a condition.
All methods are public and return the object of the Uiselector class.
Text-related methods:
1.text (String text) text
2.textContains (String text) text contains
3.textMatches (String regex) text regular
4.textStartsWith (String text) text start character
Methods for describing aspects:
1.description (String desc) description
2.descriptionContains (String desc) describes the containing
3.descriptionMatches (String regex) describes the regular
4.descriptionStartsWith (String desc) describes the start character
Method of class Name:
1.childSelector (uiselector selector) sub-class
2.className (String className) class name
The method of Example:
1.index (int index) number
2.instance (int instantce) index
Unique properties:
1.checked (Boolean val) select attribute
2.chickable (Boolean val) click Properties
3.enabled (Boolean val) enabled property
4.focusable (Boolean val) Focus property
5.longClickable (Boolean val) long Press property
6.scrollable (Boolean val) scrolling property
7.selected (Boolean val) select attribute
The package name aspect Method:
1.packageName (String name) package name
2.packageNameMatches (String Regex) package name regular
Methods for resource ID:
1.RESOURCEID (String ID) resource ID
2.resourceIdMatches (String regex) resource ID Regular
Refer to the following documents:
Http://wenku.baidu.com/view/781a31b68762caaedd33d4c6.html?re=view
Introduction to the Android Automation test Uiautomator--uiselector interface