Example #1
0
 def Appinstall(self):
     #全部在线设备的安装
     commands = []
     for devices in AdbTools().getOnlineDevices():
         cmd = AdbTools(devices).install(path)
         commands.append(cmd)
     return commands
Example #2
0
 def AppKill(self):
     appName = AdbTools().dump_apk_name(path)
     # pid = AdbTools().get_pid(appName)
     commands = []
     for devices in AdbTools().getOnlineDevices():
         cmd = AdbTools(devices).kill_process(appName)
         commands.append(cmd)
     return commands
Example #3
0
 def appLogcat(self):
     #全部在线设备的安装
     commands = []
     for devices in AdbTools().getOnlineDevices():
         cmd = Common().adbLogcat(devices)
         commands.append(cmd)
     return commands
Example #4
0
 def tvInstall(self):
     #只安装列表里的TV设备
     commands = []
     for devices in otherDevices().get_tvDevices():
         cmd = AdbTools(devices).install(path)
         commands.append(cmd)
     return commands
Example #5
0
 def mobileInstall(self):
     #只安装列表里的手机设备
     commands = []
     for devices in otherDevices().get_mobileDevices():
         cmd = AdbTools(devices).install(path)
         commands.append(cmd)
     return commands
Example #6
0
 def AppUninstall(self):
     commands = []
     for devices in AdbTools().getOnlineDevices():
         cmd = AdbTools(devices).uninstall(packName)
         commands.append(cmd)
     return commands
Example #7
0
#!/usr/bin/env python
#coding=utf-8

from Utils.adbUtils import AdbTools
from Utils.Common import Common

class UninstallCase:


    def AppUninstall(self):
        commands = []
        for devices in AdbTools().getOnlineDevices():
            cmd = AdbTools(devices).uninstall(packName)
            commands.append(cmd)
        return commands

if __name__ == '__main__':
    path = Common().apkPath()
    packName = AdbTools().dump_apk_name(path)
    UninstallCase().AppUninstall()
Example #8
0
 def AppQuit(self):
     commands = []
     for devices in AdbTools().getOnlineDevices():
         cmd = AdbTools(devices).quit_app(packName)
         commands.append(cmd)
     return commands
Example #9
0
 def tvClear(self):
     commands = []
     for devices in otherDevices().get_tvDevices():
         cmd = AdbTools(devices).clear_app_data(packName)
         commands.append(cmd)
     return commands
Example #10
0
 def appClear(self):
     commands = []
     for devices in AdbTools().getOnlineDevices():
         cmd = AdbTools(devices).clear_app_data(packName)
         commands.append(cmd)
     return commands
Example #11
0
 def AppRun(self):
     commands = []
     for devices in AdbTools().getOnlineDevices():
         cmd = AdbTools(devices).start_application(packName)
         commands.append(cmd)
     return commands
Example #12
0
#!/usr/bin/env python
#coding=utf-8

from Utils.adbUtils import AdbTools
from Utils.Common import Common


class InstallCase:
    def AppRun(self):
        commands = []
        for devices in AdbTools().getOnlineDevices():
            cmd = AdbTools(devices).start_application(packName)
            commands.append(cmd)
        return commands


if __name__ == '__main__':
    path = Common().apkPath()
    packName = AdbTools().dump_apk_name(
        path) + '/' + AdbTools().dump_apk_launch(path)
    InstallCase().AppRun()