我创建了以下脚本并将其保存为 lib 文件夹中的 (test.mr) 并从命令提示符 C:\Android_Stuff\android-sdk-windows\tools\lib\monkeyrunner test.mr 运行
@Importing monkeyrunner
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
@waiting for the device connection
device = MonkeyRunner.waitForConnection()
@Installing my app.
device.installPackage('C:/Android_Stuff/android-sdk-windows/tools/lib/purchase.apk')
@starting my demo page
device.startActivity(component='com.mobilemoneynetwork.purchase/.demo')
@selecting the Menu Button.
device.press('KEYCODE_MENU','DOWN_AND_UP')
我正进入(状态
Unable to access jarfile ..\framework\archquery.jar
SWT folder '' does not exist.
Please set ANDROID_SWT to point to the folder containing swt.jar for your platform.