FunctionCommon.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:PhonePerformanceMeasure 作者: KyleCe 项目源码 文件源码
def serial_clicks_by_control_file(tag):
    log('launch click process of ' + tag)
    p_open(Res.adb_start_launcher(tag))
    sleep(Res.pkg_init_delay)  # init taking time

    lines = get_usable_lines_from_file(Res.splash_file)
    for i in range(len(lines)):
        items = lines[i].split(Res.split_mark)
        if i == Res.action_cm_launcher_index:
            send_key_home(tag)
            sleep(1)  # invoke default home takes time
        p_open(Res.adb_tap_with_tag(tag, items[1], items[2]))
        if len(items) > Res.delay_index_one_point:
            sleep(items[Res.delay_index_one_point])
        sleep(3 if i < Res.action_cm_launcher_index else Res.default_delay_in_click)
        if i >= Res.action_always_index:
            send_key_home(tag)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号