UITesting xcode7详细信息披露按钮 [英] UITesting xcode7 detail disclosure button
问题描述
在TableView中,每个单元格都有详细的公开按钮(>),按下时会将用户重定向到另一个ViewController。
错误说UI测试失败 - 找不到按钮匹配。以下是我的代码
for(XCUIElement * cell in tablesQuery.cells.staticTexts.allElementsBoundByIndex){
[cell tap];
XCUIElementQuery * elementsQuery = cell.buttons;
XCUIElement * detailsButton = elementsQuery.buttons [@right info arrow];
[detailsButton tap] ;
}
需要帮助!
谢谢
In the TableView, Each cell has detail disclosure button ( >), when pressed will redirect the user to another ViewController.
Error says "UI Testing Failure - No matches found for Button" . Following is my code
for (XCUIElement *cell in tablesQuery.cells.staticTexts.allElementsBoundByIndex) {
[cell tap];
XCUIElementQuery *elementsQuery = cell.buttons;
XCUIElement *detailsButton = elementsQuery.buttons[@"right info arrow"];
[detailsButton tap];
}
Need Help!
Thanks
推荐答案
我认为你的访问路径或访问者是错误的。
I think your access path or accessor is wrong.
for (XCUIElement *cell in tablesQuery.cells.allElementsBoundByIndex) {
否则你可能会访问一些错误的元素来输出。
else you may access some wrong elements make some output.
这篇关于UITesting xcode7详细信息披露按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!