【发布时间】:2015-08-14 16:44:08
【问题描述】:
我是 UIAutomation 的新手,我正在尝试向 UITabelView 中的两个文本字段输入值。
我试过的脚本如下
var target = UIATarget.localTarget();
var app = target.frontMostApp();
var window = app.mainWindow();
target.delay(1);
var tableView = window.tableViews()[0];
tableView.logElementTree();
var cellOne = tableView.cells()[0].textFields()[0].setValue(“username”);
var cellTwo = tableView.cells()[1].textFields()[0].setValue(“password”);
第一个单元格中的文本字段总是被输入,但第二个总是失败。当我尝试记录其元素树时,它返回 UIElementNil
我的脚本有问题吗?
【问题讨论】:
标签: javascript ios xcode instruments ui-automation