You can select the first cell as a collection with:
let app = XCUIApplication()
app.launch()
let firstChild = app.collectionViews.childrenMatchingType(.Any).elementBoundByIndex(0)
if firstChild.exists {
firstChild.tap()
}
Swift 3
let firstChild = app.collectionViews.children(matching:.any).element(boundBy: 0)
if firstChild.exists {
firstChild.tap()
}
. , , . , .