Not much documentation available...wondering if any one has figured this out already?
Xcode7: UI testing....select first row in a table view
You should be able to do something like:
let firstCell = app.tableViews[0].cells[0].tap()
If the screen you're on has multiple tableviews, then change the tableViews[0] to 1,2,3, etc
Thank you. About multiple table views, I chose to set the accessibilityIdentifier property to the tableView I am interested in. Below are the complete steps:
1. In your view controller:
self.table.accessibilityIdentifier = @"TableVC_Table"
2. Test script:
let tableView = app.tables.containingType(.Table, identifier: "TableVC_Table")
XCTAssertTrue(tableView.cells.count > 0)
let firstCell = tableView.cells.elementBoundByIndex(0)
firstCell.tap()