Android的monkeyrunner的help.py在哪里?

key*_*fer 9 python testing android monkeyrunner

我只是找不到该help.py文件,以便为其创建API参考monkeyrunner.Android引用中描述的命令

monkeyrunner <format> help.py <outfile>我打电话时不起作用monkeyrunner html help.py /path/to/place/the/doc.html.

很明显,help.py找不到文件,monkeyrunner也告诉我"无法打开指定的脚本文件".但是locate在我的系统上没有给我带来与monkeyrunner或Android有任何关系的help.py文件.

所以我的问题是:他们在哪里隐藏了用于创建API引用的help.py文件?

dst*_*cks 14

我也找不到它.但是可以假设它只是使用传入的参数调用MonkeyRunner.help().如果你只想快速使用这个脚本,我创建了一个名为help.py的脚本:

#!/usr/bin/env python

# Imports the monkeyrunner modules used by this program
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice

text = MonkeyRunner.help("html");

f = open('help.html', 'w')
f.write(text);
f.close();
Run Code Online (Sandbox Code Playgroud)

像任何其他monkeyrunner脚本一样运行它:

$ monkeyrunner help.py
Run Code Online (Sandbox Code Playgroud)