to reach the particular button and then click that button using device.press("DPAD_CENTER", MonkeyDevice.DOWN_AND_UP)
例句3:
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
from com.android.monkeyrunner.easy import EasyMonkeyDevice, By
device = MonkeyRunner.waitForConnection()
easy_device = EasyMonkeyDevice(device)
# Start your android app
# touch the view by id
easy_device.touch(By.id('view_id'), MonkeyDevice.DOWN_AND_UP)
例句4:
device.getProperty("display.width"),device.getProperty("display.height") and device.getProperty("display.density")
例句5:
print str(device.getProperty('build.model')) #获得手机型号
print str(device.getProperty('build.board')) #获得手机型号
print str(device.getProperty('build.device')) #获得手机型号
例句6:
print str(device.getProperty('build.fingerprint')) #结果为:Meizi/meizi_m9/m9:2.3.5/GRJ90/eng.mobileapp.20120110.135237:user/test-keys
print str(device.getProperty('build.brand')) #结果为:1326174777000