Exemplo n.º 1
0
def install_app_start_activity(tag, pkg, act, app_file, replace_apk=False, delay=6):
    if replace_apk or not FunCom.tell_app_installed(tag, pkg):
        apk_path = ''
        for f in FunCom.list_dir(FunCom.Res.util_path):
            if app_file in f:
                apk_path = FunCom.get_abspath(FunCom.path_join(FunCom.Res.util_path, f))
        if apk_path == '':
            FunCom.raise_error(
                app_file + ' Apk file not found under ./util directory')
        # windows do not support grep command, cannot tell existence
        install_r(tag, apk_path, False)
        FunCom.sleep(delay)
    FunCom.p_open(FunCom.Res.asb_shell_start_activity(tag, act))
Exemplo n.º 2
0
import sys