monkeyrunner?????????????з???
???????????? ???????[ 2015/11/5 15:02:37 ] ??????????????????
???????????:
?????????????????????test.py??python?????????????:
????from com.android.monkeyrunner import MonkeyRunner??MonkeyDevice??MonkeyImage
????#?????????android?豸????
????device = MonkeyRunner.waitForConnection()
????MonkeyRunner.sleep(3)
????#???????????????????????
????device.shell('am force-stop com.alpha.lenovo.launcher')
????MonkeyRunner.sleep(3)
????#?????????????activity
????device.startActivity(component='com.alpha.lenovo.launcher/com.alpha.lenovo.launcher.AlphaLauncher')
????#??????????
????MonkeyRunner.sleep(10)
????device.press('KEYCODE_DPAD_UP'??'DOWN_AND_UP')
????MonkeyRunner.sleep(2)
????device.press('KEYCODE_DPAD_RIGHT'??'DOWN_AND_UP')
????MonkeyRunner.sleep(5)
????device.press("KEYCODE_DPAD_CENTER"??"DOWN_AND_UP")
????MonkeyRunner.sleep(10)
????device.press('KEYCODE_DPAD_DOWN'??'DOWN_AND_UP')
????MonkeyRunner.sleep(3)
????device.press('KEYCODE_BACK '??'DOWN_AND_UP')
????MonkeyRunner.sleep(3)
????#?????
????result = device.takeSnapshot()
????#?????д??????????????????
????result.writeToFile('./pic001.png'??'png')
???????н??
????1. ???python2.7???????????????Path?????python????·??
????2. ??adb????????豸
????3. ????android sdk??tools???????monkeyrunner test.py
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11