dimanche 26 février 2017

iOS UITest - Navigate to all available screens

I am using iOS UITest for a Swift application. I use something like,

func testAllScreenNavigation() {

    let app = XCUIApplication()
    app.tabBars.buttons["Home"].tap()
    app.navigationBars["Home"].buttons["More"].tap()
    app.sheets.buttons["Cancel"].tap()
}

etc. to navigate some of the specific, tabs, buttons, etc. and switch to respective screens. But i want to navigate each and every screens of my Application (It can be BFS style navigation or DFS style navigation, no matter). Is there any way iOS provides so i can get all navigable elements and then explore deeper and deeper automatically for my App?

Aucun commentaire:

Enregistrer un commentaire