菜鸟教程小白 发表于 2022-12-11 17:58:48

ios - Xcode 8.1 UI 测试 twoFingerTap() 在谷歌地图 View 上失败


                                            <p><p>自从升级到 Xcode 8.1 后,我使用 <code>twoFingerTap()</code> 缩小 Googlemap<code>GMSMapView</code> 的 UI 测试失败了</p>

<blockquote>
<p>Assertion Failure: Element.swift:135: UI Testing Failure - Unable to find unoccluded area to perform event.</p>
</blockquote>

<p>前面的消息是</p>

<blockquote>
<p>Recompute visible frame by excluding frames of occluding elements StatusBar and &#34;<em>the view&#39;s identifier</em>&#34;</p>
</blockquote>

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

<p><strong>NB.</strong> 问题肯定出在多指点击上 -- <code>doubleTap()</code> 和 <code>pinchWithScale(2.0, velocity: 1.0)</code>在 Xcode 8.1 下继续正常工作。 <code>pinchWithScale(0.5, velocity: -1.0)</code> 继续移动原点而不是缩放,这也是 Xcode 7 中对 <code>GMSMapView</code> 所做的。</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>我不确定您是在绘制 UI 还是使用 Storyboard 。尽管如此,您似乎并没有正确地将元素绘制到 View 中。也许使用约束,您可以将元素保护到您的 View 中。 </p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - Xcode 8.1 UI 测试 twoFingerTap() 在谷歌地图 View 上失败,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/40371741/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/40371741/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - Xcode 8.1 UI 测试 twoFingerTap() 在谷歌地图 View 上失败