Skip to content

danielCarlosCE/XCUITestExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XCUITestExample

Tests more readable with Page Objects and Method Chaining :

func testSearchResultFlow() {
  SearchPage()
      .type(query: "XCode") { self.takeScreenShot() }
      .tapOk()
      .getTitle {
          XCTAssertEqual("Result for XCode", $0)
      }
}

Every Page subclass must override the rootElement

class ResultPage: Page {
  override var rootElement: XCUIElement {
    return app.otherElements["view_result"]
  }

Use Accessibility Identifiers instead of elements' values

app.buttons["btn_send"].tap()

accessibility identifiers

Disable automatic screenshots.

disable automatic screenshots

Log your tests properly to make a better report.

test report

About

Guide to use XCUITest on iOS applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages