OGeek|极客世界-中国程序员成长平台

标题: ios - Xcode 8.1 UI 测试 twoFingerTap() 在谷歌地图 View 上失败 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 17:58
标题: ios - Xcode 8.1 UI 测试 twoFingerTap() 在谷歌地图 View 上失败

自从升级到 Xcode 8.1 后,我使用 twoFingerTap() 缩小 Google map GMSMapView 的 UI 测试失败了

Assertion Failure: Element.swift:135: UI Testing Failure - Unable to find unoccluded area to perform event.

前面的消息是

Recompute visible frame by excluding frames of occluding elements StatusBar and "the view's identifier"

有人知道我应该怎么做吗?尝试了 tapWithNumberOfTaps(1, numberOfTouches: 2) 并且同样的事情发生了。

NB. 问题肯定出在多指点击上 -- doubleTap()pinchWithScale(2.0, velocity: 1.0)在 Xcode 8.1 下继续正常工作。 pinchWithScale(0.5, velocity: -1.0) 继续移动原点而不是缩放,这也是 Xcode 7 中对 GMSMapView 所做的。



Best Answer-推荐答案


我不确定您是在绘制 UI 还是使用 Storyboard 。尽管如此,您似乎并没有正确地将元素绘制到 View 中。也许使用约束,您可以将元素保护到您的 View 中。

关于ios - Xcode 8.1 UI 测试 twoFingerTap() 在谷歌地图 View 上失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40371741/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4