【问题标题】:Error performing 'single click' on view 'matches 0th view.'在视图“匹配第 0 个视图”上执行“单击”时出错。
【发布时间】:2018-11-11 05:00:14
【问题描述】:

当一个元素有多个匹配器时,Detox 无法执行 tap() 和其他操作。我目前正在 Android 模拟器 Nexus_5X_API_27 上对其进行测试。

await element(by.type('android.widget.TextView')).atIndex(0).tap();

detox 也无法通过.Type() 对匹配器执行操作,它要求提供完全限定的类名,所以我使用 'android.widget.TextView' 作为 'TextView' react-native 元素。

【问题讨论】:

    标签: detox


    【解决方案1】:

    这不是排毒问题。当 detox 无法找到测试 ID 时会发生这种情况。你能检查一下你是否已经在 child 或 Parent 中声明了测试 id,因为在 android 中它正在考虑在 Parent 中声明的 id,它通常发生在 react native 组件中

    【讨论】:

      猜你喜欢
      • 2016-07-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多