APP端用Xpath定位resource-id元素

错误写法:

driver.findElementByXPath("*//[@resource-id='com.yxbao.faith:id/bottom_menu']/android.widget.ImageView[3]");
导致定位一直失败,


正确写法

driver.findElementByXPath("//*[@resource-id='com.yxbao.faith:id/bottom_menu']/android.widget.ImageView[3]");


猜你喜欢

转载自blog.csdn.net/qq_36467991/article/details/80531599
今日推荐