Exemple #1
0
 def stop_discovery(self):
     time.sleep(1)
     status = checkfile.check_stauts('text="停止搜索"')
     if status == True:
         Command(BT_Comm['DISCOVERY']).start()
         logger.info('**********stop discovery********')
         result = check_system.check_test_result(
             'page://settings.yunos.com')
         if result == False:
             raise Exception('start discovery occur with issues')
Exemple #2
0
def main():
    stauts = True
    try:
        video.video_set_up('animal.mp4')
        base.unlock()
        time.sleep(3)
        video.launch_video()
        time.sleep(1)
        video.check_push_video()
        video.play_video()
        time.sleep(10)
        video.cyclic_video()
        finish_time = video.run_Task()
        if finish_time == True:
            check_system.check_test_result('page://videoplayer.yunos.com')
            base.exit_app()
    except Exception, msg:
        logger.debug('Exception:%s' % msg)
        stauts = False
Exemple #3
0
 def stop_scanner(self):
     stauts = checkfile.check_stauts('text="附近所有的蓝牙设备均可检测到此设备"')
     if stauts == True:
         status, output, error = Command(BT_Comm['SCANNER']).start()
         base.check_adb_command('ret = true', output)
         result = check_system.check_test_result(
             'page://settings.yunos.com')
         if result == False:
             raise Exception('start discovery occur with issues')
     logger.info('open scanner is success')
Exemple #4
0
        time.sleep(3)
        video.launch_video()
        time.sleep(1)
        video.check_push_video()
        video.play_video()
        video.seek_video(6)
        base.exit_app()

        ##########
    except Exception, msg:
        logger.debug('Exception:%s' % msg)
        stauts = False
    return stauts


try:
    main_test = main()
    check = check_system.check_test_result('page://videoplayer.yunos.com')
    del_video = video.delete_video_file()
    if main_test == True and check == True and del_video == True:
        VERDICT = SUCCESS
    else:
        VERDICT = FAILURE

except Exception, msg:
    logger.debug('Exception:%s' % msg)

##clear
finally:
    base.exit_app()
        ##########
        video.launch_video()
        time.sleep(1)
        video.check_push_video()
        video.play_video_assign('text="animal"')
        time.sleep(80)
        base.exit_app()

    except Exception, msg:
        logger.debug('Exception:%s' % msg)
        stauts = False
    return stauts


try:
    main_test = main()
    check = check_system.check_test_result('page://videoplayer.yunos.com')
    del_video = video.delete_video_file()
    check_package = check_system.check_test_result('page://browser.yunos.com')
    if main_test == True and check_package == True and del_video == True and check == True:
        VERDICT = SUCCESS
    else:
        VERDICT = FAILURE

except Exception, msg:
    logger.debug('Exception:%s' % msg)

##clear
finally:
    base.exit_app()