Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道如何在Objective C的UI测试上的按钮上实现点击事件。示例代码片段是可观的。我在 Swift 上找到了一些示例。任何人都可以帮助和指导目标 c。
let app = XCUIApplication() app.launch() let button = app.buttons["Start"] button.tap()
我想要在目标 c 上进行类似的实现。
最后我得到了答案,
XCUIApplication *app = [[XCUIApplication alloc] init]; [app.buttons[@"Start"] tap];