我正在努力访问TableView的FooterView内部的按钮。这是观点:
我试图点击红色方块内的按钮。
var loyaltyCardTable = app.tables["loyaltyCardTable"]
loyaltyCardTable.otherElements.matching(identifier: "summaryLoyaltyCardFooter").element(boundBy: 0).buttons["informationButton"].tap()
当我尝试stoped测试和打印查询时,这是输出:
Query chain:
→Find: Target Application 0x1700b0140
Output: {
Application 0x17057b540: {{0.0, 0.0}, {375.0, 667.0}}, label: 'DirectBistro'
}
↪︎Find: Descendants matching type Table
Output: {
Table 0x17457d400: traits: 35192962023424, {{0.0, 64.0}, {375.0, 554.0}}, identifier: 'loyaltyCardTable'
}
↪︎Find: Elements matching predicate '"loyaltyCardTable" IN identifiers'
Output: {
Table 0x17457d400: traits: 35192962023424, {{0.0, 64.0}, {375.0, 554.0}}, identifier: 'loyaltyCardTable'
}
↪︎Find: Descendants matching type Other
Output: {
Other 0x17457d340: traits: 8589934592, {{0.0, -262.0}, {375.0, 180.0}}
Other 0x17457cd40: traits: 8589934592, {{0.0, 64.0}, {375.0, 50.0}}
Other 0x17457ce00: traits: 8589934592, {{0.0, 64.0}, {375.0, 50.0}}
Other 0x17457c500: traits: 8589934592, {{0.0, 178.0}, {375.0, 90.0}}
Other 0x17457c440: traits: 8589934592, {{0.0, 178.0}, {375.0, 90.0}}
Other 0x17457c380: traits: 8589934592, {{0.0, 178.0}, {375.0, 90.0}}
Other 0x17457c2c0: traits: 8589934592, {{0.0, 178.0}, {375.0, 90.0}}
Other 0x174576e00: traits: 8589934592, {{0.0, 178.0}, {375.0, 90.0}}
Other 0x17457c5c0: traits: 8589934592, {{0.0, 178.0}, {375.0, 90.0}}, identifier: 'summaryLoyaltyCardFooter'
Other 0x17457c140: traits: 8589934592, {{0.0, 268.0}, {375.0, 50.0}}
Other 0x17457c200: traits: 8589934592, {{0.0, 268.0}, {375.0, 50.0}}
Other 0x17457b480: traits: 8589934592, {{0.0, 528.0}, {375.0, 90.0}}
Other 0x17457b3c0: traits: 8589934592, {{0.0, 528.0}, {375.0, 90.0}}
Other 0x17457b300: traits: 8589934592, {{0.0, 528.0}, {375.0, 90.0}}
Other 0x17457b180: traits: 8589934592, {{0.0, 528.0}, {375.0, 90.0}}
Other 0x17457a940: traits: 8589934592, {{0.0, 528.0}, {375.0, 90.0}}
Other 0x17457b540: traits: 8589934592, {{0.0, 528.0}, {375.0, 90.0}}, identifier: 'summaryLoyaltyCardFooter'
}
↪︎Find: Elements matching predicate '"summaryLoyaltyCardFooter" IN identifiers'
Output: {
Other 0x17457c5c0: traits: 8589934592, {{0.0, 178.0}, {375.0, 90.0}}, identifier: 'summaryLoyaltyCardFooter'
Other 0x17457b540: traits: 8589934592, {{0.0, 528.0}, {375.0, 90.0}}, identifier: 'summaryLoyaltyCardFooter'
}
↪︎Find: Element at index 0
Output: {
Other 0x17457c5c0: traits: 8589934592, {{0.0, 178.0}, {375.0, 90.0}}, identifier: 'summaryLoyaltyCardFooter'
}
↪︎Find: Descendants matching type Button
↪︎Find: Elements matching predicate '"informationButton" IN identifiers'
你有没有解决过这个问题?