Lines Matching refs:self
28 def __init__(self, adbDevice): argument
29 self._adbDevice = adbDevice
31 def runAdbCommand(self, cmd): argument
32 self.waitForAdbDevice()
33 adbCmd = "adb -s %s %s" %(self._adbDevice, cmd)
37 def runShellCommand(self, cmd): argument
38 return self.runAdbCommand("shell " + cmd)
40 def waitForAdbDevice(self): argument
41 os.system("adb -s %s wait-for-device" %self._adbDevice)
43 def waitForBootComplete(self, timeout = 240): argument
48 (output, err) = self.runShellCommand("getprop dev.bootcomplete")
59 def installApk(self, apkPath): argument
60 (out, err) = self.runAdbCommand("install -r -d -g " + apkPath)
64 def uninstallApk(self, package): argument
65 (out, err) = self.runAdbCommand("uninstall " + package)
69 def runInstrumentationTest(self, option): argument
70 return self.runShellCommand("am instrument -w " + option)
72 def isProcessAlive(self, processName): argument
73 (out, err) = self.runShellCommand("ps")
80 def getDensity(self): argument
81 if "emulator" in self._adbDevice:
82 return int(self.runShellCommand("getprop qemu.sf.lcd_density")[0])
84 return int(self.runShellCommand("getprop ro.sf.lcd_density")[0])
86 def getSdkLevel(self): argument
87 return int(self.runShellCommand("getprop ro.build.version.sdk")[0])
89 def getOrientation(self): argument
90 return int(self.runShellCommand("dumpsys | grep SurfaceOrientation")[0].split()[1])