from com.android.monkeyrunner import MonkeyRunner from com.android.monkeyrunner.recorder import MonkeyRecorder device = MonkeyRunner.waitForConnection(5,"021YLJ4C33001340") MonkeyRecorder.start(device)
#usage: monkeyrunner monkey_recorder.py from com.android.monkeyrunner import MonkeyRunner as mr from com.android.monkeyrunner.recorder import MonkeyRecorder as recorder device = mr.waitForConnection() recorder.start(device)
# -*- coding: utf-8 -*- # @Author: caolinming # @Date: 2016-07-22 11:21:57 # @Last Modified by: caolinming # @Last Modified time: 2016-07-22 11:31:03 from com.android.monkeyrunner import MonkeyRunner as mr from com.android.monkeyrunner.recorder import MonkeyRecorder as recorder device = mr.waitForConnection() recorder.start(device)
from com.android.monkeyrunner import MonkeyRunner from com.android.monkeyrunner.recorder import MonkeyRecorder device = MonkeyRunner.waitForConnection(5, '127.0.0.1:62001') MonkeyRecorder.start(device)
# -*- coding: UTF-8 -*- from com.android.monkeyrunner import MonkeyRunner from com.android.monkeyrunner.recorder import MonkeyRecorder device = MonkeyRunner.waitForConnection() # 连接设备 if device: print("device start") MonkeyRecorder.start(device) # 录制开始
def record(self): MonkeyRecorder.start(self.mDevice)
def record(self): #jython can't access private fileds, so just start original recorder recorder.start(self.device)
#!/usr/bin/env monkeyrunner from com.android.monkeyrunner import MonkeyRunner as mr from com.android.monkeyrunner.recorder import MonkeyRecorder MonkeyRecorder.start(mr.waitForConnection())
def record(): from com.android.monkeyrunner.recorder import MonkeyRecorder recorder = MonkeyRecorder() recorder.start(MonkeyRunner.waitForConnection())