三、定位控件

(1)id定位
 
通过uiautomatorviewer.bat 工具可以查看对象的id属性。如果目标设备的API Level低于18则UIAutomatorViewer不能获得对应的Resource ID,只有等于大于18的时候才能使用。
打开uiautomatorviewer.bat工具:
 
使用方法:
 
 
(2)name定位
 
 
text就是要找的name,使用方法:
 
 
(3)class name 定位
 
 
(4)xpath定位
 
 
 
(5)Accessiblity ID定位
 
 
(6)Android uiautomator定位
 
 
 
 
 
 
 
 
 
 
 
 
 

猜你喜欢

转载自www.cnblogs.com/Tester-Chenmo/p/12930757.html
今日推荐