1.打开  uiautomatorviewer ,位置(根据自己安卓SDK位置)android_sdk\tools\uiautomatorviewer.bat

uiautomatorviewer 定位方法:appliumlibrary + rf (亲测可用)

2.连链接真机或模拟器,之后按顺序点击,获取元素

uiautomatorviewer 定位方法:appliumlibrary + rf (亲测可用)

 

3.定位方法

 (1)content-desc定位

uiautomatorviewer 定位方法:appliumlibrary + rf (亲测可用)

  (2) resource-id定位  (也可以是小写id)

uiautomatorviewer 定位方法:appliumlibrary + rf (亲测可用)

(3)xpath定位  (@后的是属性,可以不一样,主要是看那个属性)

 例如截图这些

uiautomatorviewer 定位方法:appliumlibrary + rf (亲测可用)

uiautomatorviewer 定位方法:appliumlibrary + rf (亲测可用)

uiautomatorviewer 定位方法:appliumlibrary + rf (亲测可用)

uiautomatorviewer 定位方法:appliumlibrary + rf (亲测可用)

uiautomatorviewer 定位方法:appliumlibrary + rf (亲测可用)

 

(4)坐标定位

uiautomatorviewer 定位方法:appliumlibrary + rf (亲测可用)

uiautomatorviewer 定位方法:appliumlibrary + rf (亲测可用)

[841,1646][1049,1776]:表示该元素的x在841-1646之间,y在1049-1776之间

相关文章:

  • 2021-11-25
  • 2022-12-23
  • 2022-01-11
  • 2021-12-16
  • 2021-06-16
  • 2022-01-01
  • 2022-12-23
猜你喜欢
  • 2021-12-02
  • 2021-12-29
  • 2022-12-23
  • 2021-11-29
  • 2022-01-03
  • 2021-09-01
  • 2021-07-27
相关资源
相似解决方案