Esempio n. 1
0
    def __init__(self, scriptPath, devicesList=['1']) :
        print 'initializing...'
        #self.t = time.time()
        INFO.SYSTEM = platform.system()
        if INFO.SYSTEM.find('Windows')>=0:
            INFO.GREP = 'findstr'

        self.device = MonkeyDevice()       
        self.__reportList = []

        self.__devicesList = self.device.getDeviceSerial(devicesList)
        self.__deviceNameList = self.device.getDeviceNameList(self.__devicesList)
        self.__scriptPath = '%s' %(scriptPath[0:len(scriptPath)-3])
        self.__logPathList = self.device.getLogPathList(self.__scriptPath, self.__deviceNameList)

        for i in xrange(len(self.__logPathList)):
            INFO.DEVICE = self.__devicesList[i]
            self.device.clearLog()
            self.__make_dir(self.__logPathList[i])
            temp = reportcoloect(self.__logPathList[i])
            self.__reportList.append(temp)
            
        self.__uiselect = UiSelector(self.device)
        self.__systemInfo = SystemProperty()
        self.__click = click(self.device, self.__uiselect)
        self.__drag = drag(self.device, self.__uiselect, self.__systemInfo)
        print 'Start Case %s...' % (scriptPath)
Esempio n. 2
0
    def __init__(self, scriptPath, devicesList=['1']):
        print 'initializing...'
        #self.t = time.time()
        INFO.SYSTEM = platform.system()
        if INFO.SYSTEM.find('Windows') >= 0:
            INFO.GREP = 'findstr'

        self.device = MonkeyDevice()
        self.__reportList = []

        self.__devicesList = self.device.getDeviceSerial(devicesList)
        self.__deviceNameList = self.device.getDeviceNameList(
            self.__devicesList)
        self.__scriptPath = '%s' % (scriptPath[0:len(scriptPath) - 3])
        self.__logPathList = self.device.getLogPathList(
            self.__scriptPath, self.__deviceNameList)

        for i in xrange(len(self.__logPathList)):
            INFO.DEVICE = self.__devicesList[i]
            self.device.clearLog()
            self.__make_dir(self.__logPathList[i])
            temp = reportcoloect(self.__logPathList[i])
            self.__reportList.append(temp)

        self.__uiselect = UiSelector(self.device)
        self.__systemInfo = SystemProperty()
        self.__click = click(self.device, self.__uiselect)
        self.__drag = drag(self.device, self.__uiselect, self.__systemInfo)
        print 'Start Case %s...' % (scriptPath)
Esempio n. 3
0
    def __init__(self, scriptPath, devicesList=None):
        print "initializing..."
        # self.t = time.time()
        INFO.SYSTEM = platform.system()
        if INFO.SYSTEM.find("Windows") >= 0:
            INFO.GREP = "findstr"

        self.device = MonkeyDevice()
        self.__report = None
        self.uiautomatorDevice = None

        self.device.getDeviceSerial()
        self.device.getDeviceName()
        INFO.DEVICEVERSION = self.__getDevivceSystemVersion()

        self.uiautomatorDevice = UiautomatorDevice()

        self.__scriptPath = scriptPath
        self.__logPath = self.device.getLogPath(self.__scriptPath)
        self.device.clearLog()
        self.__make_dir(self.__logPath)
        self.__report = reportcoloect(self.__logPath)
        self.__uiselect = UiSelector(self.device)
        self.__systemInfo = SystemProperty()
        self.__click = click(self.device, self.__uiselect)
        self.__drag = drag(self.device, self.__uiselect, self.__systemInfo)
        self.__androidManifast = AndroidManifest()
        self.__wakeUpAndUnlock()
        print "Start Case %s..." % (scriptPath)