Introduction to Android Automated Test Uiautomator--uiselector interface

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.