Reputation: 40126
I am wondering how to implement tap event on a button on UI test for Objective C. A sample code snippet is appreciable. I found some example which are on Swift. Can anyone help and guide for objective c.
let app = XCUIApplication()
app.launch()
let button = app.buttons["Start"]
button.tap()
I want this similar implementation on objective c.
Upvotes: 2
Views: 1470
Reputation: 40126
Finally I got the answer,
XCUIApplication *app = [[XCUIApplication alloc] init];
[app.buttons[@"Start"] tap];
Upvotes: 2