还未发布过话题
  • 请教下 case 内的 py 脚本有啥要求

    -- encoding=utf8 --

    author = "qiuyunxia"

    from airtest.core.api import *

    auto_setup(file)

    from poco.drivers.android.uiautomation import AndroidUiautomationPoco
    poco = AndroidUiautomationPoco(use_airtest_input=True, screenshot_each_action=False)

    dev=connect_device("android:///988bdc454835315257")

    dev.stop_app("com.unity3d.ads.example.creative")
    dev_list =device()
    print(dev_list.list_app())
    dev.start_app("com.unity3d.ads.example.creative")
    poco("com.unity3d.ads.example.creative:id/unityads_example_initialize_button").click()

    snapshot()
    poco("com.unity3d.ads.example.creative:id/unityads_example_interstitial_button").click()
    sleep(4.0)
    snapshot()
    snapshot()

    wait(Template(r"tpl1547966723580.png", record_pos=(0.005, 0.828), resolution=(1080, 2220)))
    touch(Template(r"tpl1547966742057.png", record_pos=(0.005, 0.847), resolution=(1080, 2220)))

    sleep(1.0)
    snapshot()

    类似这样子不可以?




  • 运行一直显示 case 为 0,我是用的 air 作为后缀查找的,麻烦大神帮看下