简体   繁体   English

有没有办法使用 XCUITest 测试快速操作?

[英]Is there a way to test Quick Actions using XCUITest?

I am using Xcode 11.3.1 and see that the quick actions are available in the simulator.我正在使用 Xcode 11.3.1 并看到模拟器中提供了快速操作。 Is there a way to test these using XCUITest?有没有办法使用 XCUITest 测试这些? How can we launch the application and select one of these quick actions?我们如何启动应用程序并选择这些快速操作之一?

在此处输入图片说明

The bundle ID for the springboard is com.apple.springboard.跳板的包 ID 是 com.apple.springboard。 You can interact with it as you would any other application.您可以像对待任何其他应用程序一样与它进行交互。

let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard")

and then go from there.然后从那里去。 To discover its capabilities, enter a debug session and have at it.要发现它的功能,请进入调试会话并进行调试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM