首页 > 解决方案 > 如何在 UITests 中引用 MKMapView?

问题描述

我尝试了不同的策略来MKMapView在我的 UITests 中获取对 a 的引用,但找不到它。

例如:

app.maps.firstMatch.exists

或使用accessibilityIdentifier

app.maps["MyMap"].exists

app.otherElements["MyMap"].exists

但它不起作用。

标签: iosswiftmkmapviewuitest

解决方案


推荐阅读