减慢测试脚本执行

最后编辑了

概述

想要减慢测试脚本执行的原因是多种原因:

解决方案 - 使用waituntilobjectready()和waitunilobjectitemready()

javascript.

function main()
{
    startApplication("addressbook");

    ...
}

function waitUntilObjectReady(obj)
{
    snooze(1);
}

function waitUntilObjectItemReady(obj)
{
    snooze(1);
}
test.js.

Python

def main():
    startApplication("...")

    ...

def waitUntilObjectReady(obj):
    snooze(1)
 
def waitUntilObjectItemReady(obj):
    snooze(1)
test.py.