【问题标题】:xcode - Add delay to instruments scriptxcode - 向仪器脚本添加延迟
【发布时间】:2014-01-26 23:43:04
【问题描述】:

如何在 Xcode Instruments UI 脚本中添加延迟?我有一个可能需要一秒钟才能加载的视图。我已经尝试了这些 waitForValid 建议,发现 here 但我无法让它工作,因为我真的没有要检查的对象。我可以等待情节提要 ID 出现吗?

【问题讨论】:

    标签: xcode instruments ui-automation ios-ui-automation xcode-instruments


    【解决方案1】:

    可以在 Apple 文档中找到答案。我不知何故错过了它,并感到羞愧。

    UIATarget.localTarget().delay(X);
    

    在几秒钟内获得 X。

    UsingtheAutomationInstrument

    【讨论】:

      【解决方案2】:

      或者,您是否使用活动指示器来显示加载进度?

      那么也许您可以检查UIAActivityIndicator 的可见性。

      【讨论】:

        猜你喜欢
        • 2023-04-05
        • 1970-01-01
        • 2020-09-22
        • 1970-01-01
        • 2015-09-07
        • 1970-01-01
        • 2012-03-25
        • 2010-10-06
        • 1970-01-01
        相关资源
        最近更新 更多