菜鸟教程小白 发表于 2022-12-12 20:57:41

ios - 出现模态对话框时,GREYaction 不起作用


                                            <p><p>我按照提供的说明在我的应用程序中使用 Google Maps API <a href="https://www.raywenderlich.com/109888/google-maps-ios-sdk-tutorial" rel="noreferrer noopener nofollow">here</a> .一旦我启动该应用程序,就会出现一个权限模式,要求打开位置服务。我在应用程序上运行了使用 EarlGrey 的 UI 测试,我注意到我无法与此模式交互,并且无法执行其他 EarlGrey 操作。 </p>

<p>EarlGrey 根本不支持模态还是只与系统模态有关?</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p><code>EarlGrey</code> 只能根据其<a href="https://github.com/google/EarlGrey/blob/master/docs/features.md" rel="noreferrer noopener nofollow">features doc</a> 与属于应用进程的模态对话框和警报进行交互。 .</p>

<blockquote>
<p>Note: Out-of-process (i.e. system generated) alert views and other
modal dialogs that obscure the UI can interfere with this process
(Visibility Check / Interactions).</p>
</blockquote>

<p>但是,您可以通过一些变通方法来帮助消除这些模式和警报。</p>

<ul>
<li><p>您可以将此解决方法用于系统对话框,该解决方法已在模拟器上进行了测试。</p></li>
<li><p>您可以手动添加接受提示,因此任何进一步的测试调用都会让它们已经被接受/拒绝。</p></li>
<li><p>如果这些可能是内部对话框,您也可以尝试模拟它们。</p></li>
</ul></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 出现模态对话框时,GREYaction 不起作用,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/38109810/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/38109810/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 出现模态对话框时,GREYaction 不起作用