我正在使用MonkeyTalk自动化iOS测试。当我尝试验证一个值时,我得到了以下错误。
失败:应为"Joe Smith",但找到"(null)“
MonkeyTalk代码为:
Table "Empty list" Verify "Joe Smith" item(1)
基本上,我有一个搜索用户字段,它返回一个包含用户列表的表。我想验证单元格是否具有正确的值。
有人拿到这份工作了吗?或者知道一种解决方法?
发布于 2013-05-02 00:50:53
这是给你的完美答案:-)
如果您使用默认的UITableViewCell Table * Verify "Hydrogen" item(1)将会工作如果您使用默认的UITableViewCell DetailTextLabel将会运行UITableViewCell DetailTextLabel
否则你就有很好的方法去做了。
MonkeyTalk : Verify custom UITableViewCell Label text without select the cell
发布于 2014-02-07 12:57:39
对于自定义列表,您可以通过改变循环中的所有标签来完成此操作。如下所示:
var i=1;
while(i)
{
try
{
app.label.verify("Joe Smith","value","Label doesn't match.");
i++;
}
catch(err)
{
app.debug().print("No More Labels in Table");
}
}https://stackoverflow.com/questions/15164677
复制相似问题