【问题标题】:Can we get View from UIObject class of UIAutomator我们可以从 UIAutomator 的 UIObject 类中获取 View
【发布时间】:2017-08-23 21:59:41
【问题描述】:

可以从UI匹配过程中获取View类而不是UIObject类吗?

【问题讨论】:

    标签: android testing android-testing android-uiautomator


    【解决方案1】:

    简而言之,答案是否定的。您无法从 UI 匹配过程中获取 View 类。

    UIAutomator 旨在模拟用户操作(触摸、滑动、拖动等)。您不应该直接在 View 上调用任何方法。并且理论上 UIAutomator 已经提供了足够的 API 来做任何 UI 操作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-07-17
      • 1970-01-01
      • 1970-01-01
      • 2021-04-05
      • 1970-01-01
      • 1970-01-01
      • 2022-08-14
      • 1970-01-01
      相关资源
      最近更新 更多