一、微信-我的列表,左侧这一栏各个元素的定位,通过xpath-属性@class 和属性@instance
//*[@class="com.tencent.mm.ui.MMImageView" and @instance=0]
//*[@class="com.tencent.mm.ui.MMImageView" and @instance=1]
//*[@class="com.tencent.mm.ui.MMImageView" and @instance=2]
//*[@class="com.tencent.mm.ui.MMImageView" and @instance=3]
二、xpath一个元素(微信-我的-‘卡包’入口)的3种定位方式
(1)通过xpath-属性@resource-id 和属性@instance
//*[@resource-id="android:id/title" and @instance=5]
(2)通过xpath-属性@text 和属性@instance
//*[@text ="卡包" and @instance=5]
(3)通过xpath-属性@class 和属性@instance
//*[@class="android.widget.TextView" and @instance=5]