gpt4 book ai didi

ios - UIAutomation 和 NSNotification

转载 作者:行者123 更新时间:2023-11-28 20:35:01 24 4
gpt4 key购买 nike

我希望能够使用 UIAutomation 来测试应用程序。我遇到的问题是,我需要从网络下载大量数据。有没有一种方法可以暂停 UIAutomation 脚本,直到发布 NSNotification,或者我只需要 delay() 比我认为下载数据所需的时间更长。等待一定的时间并不可取,因为有时不需要重新下载数据。

非常感谢任何帮助/链接。

最佳答案

UIAutomation 有一个漂亮的函数,叫做 waitForInvalid()。如果您有一个进度条或会在数据下载完成后显示然后删除的东西,您可以使用它。

这也适用于用户已经拥有数据而您不显示 UI 的情况,因为该函数会立即返回。

关于ios - UIAutomation 和 NSNotification,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10888613/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com