https://github.com/danielcarlosce/xcuitestexample
Guide to use XCUITest on iOS applications
https://github.com/danielcarlosce/xcuitestexample
Last synced: about 1 year ago
JSON representation
Guide to use XCUITest on iOS applications
- Host: GitHub
- URL: https://github.com/danielcarlosce/xcuitestexample
- Owner: danielCarlosCE
- Created: 2017-12-02T14:21:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-02T14:40:29.000Z (over 8 years ago)
- Last Synced: 2025-04-15T08:02:00.827Z (over 1 year ago)
- Language: Swift
- Size: 155 KB
- Stars: 16
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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()`

Disable automatic screenshots.

Log your tests properly to make a better report.
