【问题标题】:Script threw an uncaught JavaScript error: UIAElementNil is not a function (evaluating 'tableView.cells().logElementTree()')脚本抛出未捕获的 JavaScript 错误:UIAElementNil 不是函数(正在评估“tableView.cells().logElementTree()”)
【发布时间】:2015-05-04 10:29:37
【问题描述】:

这行 UI 自动化代码:

tableView.logElementTree();

给出这个:

然后这样做

tableView.cells().logElementTree();

给我这个:

Script threw an uncaught JavaScript error: UIAElementNil is not a function (evaluating 'tableView.cells().logElementTree()') 

这适用于我正在使用的另一个 tableView,那么这里有什么区别?以及有关修复的任何建议?

【问题讨论】:

    标签: uitableview instruments ui-automation uiatableview


    【解决方案1】:

    tableView.cells() 返回一个表格单元格数组。您需要选择一个单元格,您想按名称tableView.cells()["cellName"] 或按索引打印日志树,tableView.cells()[0]。或者,如果您想查看每个单元格的日志树,可以循环打印。

    【讨论】:

      猜你喜欢
      • 2013-01-05
      • 1970-01-01
      • 1970-01-01
      • 2021-09-30
      • 1970-01-01
      • 2020-07-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多