【发布时间】:2015-08-23 09:08:00
【问题描述】:
这是我的简单UITest(自定义tabbarcontroller中的标签顺序):
func testIsOrderOfTabsSaved() {
let app = XCUIApplication()
let tabBarsQuery = app.tabBars
tabBarsQuery.buttons["More"].tap()
app.navigationBars["More"].buttons["Edit"].tap()
tabBarsQuery.buttons["Takeaway"].swipeLeft()
tabBarsQuery.buttons["In Restaurant"].swipeLeft()
//here, how to get position of moved button with text "In Restaurant"?
注意:
可以通过索引从XCUIElementQuery获取XCUIElement。我可以反过来做吗?
【问题讨论】:
标签: ios xcode swift xcode-ui-testing ui-testing