mardi 28 février 2017

iOS UITests - How to find how many screen are in view stack?

I am working in an iOS app UITests. I have several questions. At any point of a test functions:

  1. How do I know how many screen are in view stack currently?
  2. How can I fire a back event which will go to back screen?
  3. How can I get a list of currently visible xcuielements?

For example,

let app = XCUIApplication()
app.tabBars.buttons["Home"].tap()
app.navigationBars["Home"].buttons["Test Screen"].tap()

After executing this peace of lines, suppose, I am in Test Screen I would like to query all tappable ui elements and after logging I want to fire a back event. How do I do that?

Aucun commentaire:

Enregistrer un commentaire