1.若页面该元素没有ID

Appium中使用相对路径定位元素Xpath

2.找出该元素父类,并拷贝出父类的class(类名)和ID

Appium中使用相对路径定位元素Xpath

 

3.点击搜索图标,进行查找

Appium中使用相对路径定位元素Xpath

selector内容://android.widget.LinearLayout[@resource-]

其中//父类名[@resource-该元素的content-desc值'']

Appium中使用相对路径定位元素Xpath

 

4.点击search,若定位成功则有元素显示

Appium中使用相对路径定位元素Xpath

5.返回上一级,selector中的路径则为该元素的xpath

 

相关文章:

  • 2021-10-13
  • 2021-12-13
  • 2022-12-23
  • 2021-09-23
  • 2021-07-07
  • 2021-09-24
  • 2020-01-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-14
  • 2021-12-10
  • 2021-06-30
  • 2022-12-23
相关资源
相似解决方案