def main(): stauts = True try: ########setup video.video_set_up('dayu.mp4') #####play video base.unlock() time.sleep(3) video.launch_video() time.sleep(1) video.check_push_video() i = 0 while i < 100: video.play_video() video.cyclic_video() time.sleep(5) base.back() time.sleep(2) i += 1 logger.info('current cycle is %d' % i) ########## except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def main(): stauts = True try: base.unlock() base.setup() base.find_setting() bt.disable_airplane() time.sleep(3) i = 0 while i < 50: wifi.wifi_setup() wifi.connect_wifi('YUNOS_Auto_Test_2G') base.back() bt.enable_airplane() time.sleep(10) wifi.check_connect_disable() bt.disable_airplane() time.sleep(10) wifi.check_connect_enable() base.exit_app() i += 1 logger.info('stress times is %d' % i) ########################## except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def main(): #SETUP try: base.unlock() base.setup() #Change the adapter name. base.find_setting() bt.enable_bt() bt.change_adapter_name('YUNOS') base.back() bt.disable_bt() ###########disable and enable bt base.back() bt.enable_bt() bt.check_adapter_name('text="YUNOS"') ######################### bt.start_scanner() bt.stop_scanner() bt.check_adapter_name('text="YUNOS"') time.sleep(1) bt.revert_adapter_name() except Exception, msg: logger.debug('Exception:%s' % msg)
def main(): stauts = True try: base.unlock() base.setup() wifi.wifi_setup() wifi.connect_wifi('YUNOS_Auto_Test_2G') for i in range(50): wifi.disable_wifi() time.sleep(5) wifi.enable_wifi() time.sleep(5) base.back() time.sleep(10) wifi.check_connect_enable() time.sleep(2) wifi.wlan_info() logger.info('************stress times is************ %d' % i) ########################## except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def check_connect_enable(self): Command(WIFI_Comm['LANCH_WIFI']).start() time.sleep(2) status = checkfile.check_stauts('text="已连接"') if status == True: logger.info('enable connect is success') base.back() else: raise Exception('enable connect is failed')
def add_hidden_ssd(self): Command('adb -host shell input swipe 900 700 900 100').start() checkfile.click('text="添加网络"') time.sleep(1) Command('adb -host shell input text "ITFLEX_YUNOS_H"').start() time.sleep(1) checkfile.click('text="安全性"') time.sleep(1) checkfile.click('text="PSK"') time.sleep(1) Command('adb -host shell input tap 600 300').start() Command('adb -host shell input text 12345678').start() Command(WIFI_Comm['SELECT_RITHT']).start() time.sleep(10) base.back() self.check_connect_enable()
def main(): stauts = True try: base.unlock() base.setup() wifi.wifi_setup() wifi.connect_wifi('YUNOS_Auto_Test_2G') base.back() wifi.disconnect_wifi('YUNOS_Auto_Test_2G') wifi.connect_wifi('YUNOS_Auto_Test_2G') ########################## except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def main(): stauts = True try: base.unlock() base.setup() wifi.wifi_setup() wifi.connect_wifi('text="YUNOS_Auto_Test_2G"') wifi.swtich_ap_connect('text="YUNOS_Auto_Test_5G"') time.sleep(5) wifi.check_ap_status() base.back() wifi.disconnect_wifi('text="YUNOS_Auto_Test_5G"') ########################## except Exception,msg: logger.debug('Exception:%s'%msg) stauts = False
def main(): stauts = True try: video.video_set_up('zhoujielun.mp4', 'animal.mp4') base.unlock() ##play video with 3d high rate video video.launch_video() time.sleep(1) video.check_push_video() video.play_video_assign('text="zhoujielun"') time.sleep(60) base.back() video.play_video_assign('text="animal"') time.sleep(60) base.exit_app() except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def main(): stauts = True try: base.unlock() base.setup() wifi.wifi_setup() wifi.disable_wifi() base.back() bt.enable_airplane() time.sleep(10) wifi.check_connect_disable() bt.disable_airplane() time.sleep(10) wifi.check_connect_disable() ########################## except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def main(): stauts = True try: base.unlock() base.setup() i = 0 while i < 50: wifi.wifi_setup() wifi.connect_wifi('YUNOS_Auto_Test_2G') base.back() wifi.disconnect_wifi('YUNOS_Auto_Test_2G') base.exit_app() i += 1 logger.info('stress times is %d' % i) ########################## except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def main(): stauts = True try: base.unlock() base.setup() base.find_setting() bt.disable_airplane() time.sleep(3) wifi.wifi_setup() wifi.connect_wifi('YUNOS_Auto_Test_2G') base.back() bt.enable_airplane() time.sleep(10) wifi.check_connect_disable() bt.disable_airplane() time.sleep(10) wifi.check_connect_enable() ########################## except Exception,msg: logger.debug('Exception:%s'%msg) stauts = False
def set_up(): base.screen_on() base.unlock() base.setup() base.back()
#coding:utf-8 from wifibase_version1 import wifi from base.dumbase import base from base.logger import logger def main(): stauts = True try: base.unlock() base.setup() wifi.wifi_setup() wifi.add_hidden_ssd() ########################## except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False finally: base.back() wifi.disconnect_wifi('ITFLEX_YUNOS_H') base.exit_app() return stauts main_test = main() if main_test == True: VERDICT = SUCCESS else: VERDICT = FAILURE
def set_up(): base.unlock() base.setup() base.back()