#! python2.7
#!/usr/bin/python
# -*- coding: UTF-8 -*-
# @author: Notordinary
# @date:2017-8-10
# @updateDate:None
self.wrapDevice.debug(self.fileobj, '---Case: %s start---' % self.CaseID)
#################################
######## Initialization #########
#################################
self.wrapDevice.debug(self.fileobj, '---Case Initialization start---')
self.mysettings.open_Settings()
self.mysettings.select_SettingsMenu_Settings('WLAN')
self.mycommon.wait(1)
self.wrapDevice.debug(self.fileobj, "---Case Initialization finished---")
for tmp in range(loopcount):
###############################
###### case start test ########
###############################
# 監控是否停止測試
if android.testimport.STOP_FLAG == True:
android.testimport.Loop_Count = len(self.Case_Result)
break
self.wrapDevice.debug(self.fileobj, "---Case steps start---")
self.myWifi.openOrCloseWlan_Wifi()
self.mycommon.wait(10)
ERROR_PIC = self.myWifi.check_OpenOrCloseWlan_Wifi()
if ERROR_PIC != True:
self.STEP_TITLE.append(self.mycommon.failInfo('open_Wifi_fail'))
self.recovery(tmp)
continue
self.myWifi.openOrCloseWlan_Wifi('CLOSE')
ERROR_PIC = self.myWifi.check_OpenOrCloseWlan_Wifi('CLOSE')
if ERROR_PIC != True:
self.STEP_TITLE.append(self.mycommon.failInfo('close_Wifi_fail'))
print "B"
self.recovery(tmp)
continue
self.wrapDevice.debug(self.fileobj, "---Case steps finished---")
self.Case_Result.append('PASS')
self.STEP_TITLE.append('')
self.wrapDevice.debug(self.fileobj, "---Case: %s %d time finished Result: %s---" % (self.CaseID,tmp+1,self.Case_Result[len(self.Case_Result) - 1]))
self.wrapDevice.debug(self.fileobj, '@@@@@@@@@@@@@@@******************@@@@@@@@@@@@@@@@@@')
self.myWifi.openOrCloseWlan_Wifi('CLOSE')
self.mycommon.goBack_To_Idle()
只做记录,不解释。