2

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.

Sazzad Hissain Khan
  • 37,929
  • 33
  • 189
  • 256

1 Answers1

2

Finally I got the answer,

XCUIApplication *app = [[XCUIApplication alloc] init];
[app.buttons[@"Start"] tap];
Sazzad Hissain Khan
  • 37,929
  • 33
  • 189
  • 256