dcsxlh

导航

 

功能:通过各种属性与节点关系定位组件 
操作步骤:找到对象->操作对象

2.四中匹配关系的介绍 
(1)完全匹配 
(2)包含匹配 
(3)正则匹配 
(4)起始匹

例子:完全匹配:应用

UiSelector selector=new UiSelector().description("应用");
包含匹配:应
UiSelector selector=new UiSelector().descriptionContains("应");
正则匹配
UiSelector selector=new UiSelector().descriptionMatches("应.*");
起始匹配
UiSelector selector=new UiSelector().descriptionStartsWith("应");

3.定位元素的方式

根据text构造

 

posted on 2021-02-24 23:46  多测师_肖sir  阅读(127)  评论(0编辑  收藏  举报