Пример #1
0
 def deviceConnect(self):
     commands = []
     data = dl().get_Tv_IP()
     for IP in data:
         cmd = "adb connect %s" %(IP)
         commands.append(cmd)
     Common().loop_threads(commands)
Пример #2
0
 def mobileHome(self):
     connectDevices = dl().get_mobileDevices()
     commands = []
     for device in connectDevices:
         mobileHome = KeyCode().KEYCODE_HOME(device)
         commands.append(mobileHome)
     Common().loop_threads(commands)
Пример #3
0
 def mobileBack(self):
     connectDevices = dl().get_mobileDevices()
     commands = []
     for device in connectDevices:
         mobileBack = KeyCode().KeyCode_Back(device)
         commands.append(mobileBack)
     Common().loop_threads(commands)
Пример #4
0
 def mobileAppLogcat(self):
     connectDevices = dl().get_mobileDevices()
     commands = []
     for device in connectDevices:
         adbLogcat = Adb().adbLogcat(device)
         commands.append(adbLogcat)
     return commands
Пример #5
0
 def MobileAppClear(self):
     connectDevices = dl().get_mobileDevices()
     commands = []
     for device in connectDevices:
         adbClear = Adb().adbClear(device, self.packName)
         commands.append(adbClear)
     Common().loop_threads(commands)
Пример #6
0
 def mobileAppQuite(self):
     connectDevices = dl().get_mobileDevices()
     commands = []
     for device in connectDevices:
         cmd = "adb -s %s shell am force-stop %s" % (device, self.packName)
         commands.append(cmd)
     Common().loop_threads(commands)
Пример #7
0
 def mobileAppTop(self):
     connectDevices = dl().get_mobileDevices()
     commands = []
     for device in connectDevices:
         adbTop = Adb().adbTop(device)
         commands.append(adbTop)
     return commands
Пример #8
0
 def MobileInstall(self, apk_path):
     connectDevices = dl().get_mobileDevices()
     commands =[]
     for device in connectDevices:
         cmd = Adb().adbInstall( device,apk_path)
         commands.append(cmd)
     Common().loop_threads(commands)
Пример #9
0
 def tvInstall(self, apk_path):
     connectDevices = dl().get_tvDevices()
     commands = []
     for device in connectDevices:
         cmd = "adb -s %s install -r %s" % (device, apk_path)
         commands.append(cmd)
     Common().loop_threads(commands)
Пример #10
0
 def MobileUninstall(self):
     connectDevices = dl().get_mobileDevices()
     commands = []
     for device in connectDevices:
         cmd = Adb().adbUninstall(device,self.packName)
         commands.append(cmd)
     Common().loop_threads(commands)
Пример #11
0
 def tvUninstall(self):
     connectDevices = dl().get_tvDevices()
     commands = []
     for device in connectDevices:
         cmd = "adb -s %s uninstall %s" % (device, self.packName)
         commands.append(cmd)
     Common().loop_threads(commands)
Пример #12
0
 def mobileApp(self):
     connectDevices = dl().get_MobileName()
     packName = APP().get_apk_package()
     commands = []
     for device in connectDevices:
         cmd = "adb -s %s shell am force-stop %s" % (device, packName)
         commands.append(cmd)
     Common().loop_threads(commands)
Пример #13
0
    def installApk(self, apk_path):
        connectDevices = dl().get_MobileName()
        commands = []

        for device in connectDevices:
            cmd = "adb -s %s install -r %s" % (device, apk_path)
            commands.append(cmd)
        Common().loop_threads(commands)
Пример #14
0
 def MobileAppRun(self):
     launchable_activity = APP().get_apk_activity()
     pack_lauch = self.packName +"/"+ launchable_activity
     connectDevices = dl().get_mobileDevices()
     commands = []
     for device in connectDevices:
         cmd = "adb -s %s shell am start -n %s" % (device, pack_lauch)
         commands.append(cmd)
     Common().loop_threads(commands)
Пример #15
0
    def Uninstall(self):
        packName = APP().get_apk_package()

        connectDevices = dl().get_Tv_IP()
        commands = []
        for device in connectDevices:
            cmd = "adb -s %s uninstall %s" % (device, packName)
            commands.append(cmd)
        Common().loop_threads(commands)
Пример #16
0
 def lauchApp(self):
     launchable_activity = APP().get_apk_activity()
     packName = APP().get_apk_package()
     pack_lauch = packName + "/" + launchable_activity
     connectDevices = dl().get_Tv_IP()
     commands = []
     for device in connectDevices:
         cmd = "adb -s %s shell am start -n %s" % (device, pack_lauch)
         commands.append(cmd)
     Common().loop_threads(commands)