在iOS 11.3中显示安全警报的进程的软件包ID是什么?

时间:2018-03-30 20:11:12

标签: xcuitest

我希望能够从XCUITest解决这个问题,以便说出类似

的内容

XCUIApplication(bundleIdentifier: "bundle Id").alerts.matching(Foo)

我已经了解addUIInterruptionMonitor(withDescription: description), 但似乎我们可能需要等待警报出现。

1 个答案:

答案 0 :(得分:1)

它是Springboard应用程序,因此它的Bundle ID为com.apple.springboard

运行测试时,您可以在日志中使用它。这是我的测试日志的摘录:

t =    31.89s Tap "Location service" Switch
t =    31.89s     Wait for com.mytestapp to idle
t =    31.95s     Find the "Location service" Switch
t =    32.01s         Wait for com.apple.springboard to idle
t =    32.05s     Synthesize event
t =    32.16s     Wait for com.mytestapp to idle