A monkeyrunner class that contains static utility methods.
| Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| <nobr> void </nobr> | <nobr><span class="sympad"><a href="http://www.devdiv.com/android/docs/guide/developing/tools/MonkeyRunner.html#alert" target="_blank">alert</a></span> (<em>string</em> message, <em>string</em> title, <em>string</em> okTitle) </nobr>
Displays an alert dialog to the process running the current program.
| ||||||||||
| <nobr><em>integer</em></nobr> | <nobr><span class="sympad"><a href="http://www.devdiv.com/android/docs/guide/developing/tools/MonkeyRunner.html#choice" target="_blank">choice</a></span> (<em>string</em> message, <em>iterable</em> choices, <em>string</em> title) </nobr>
Displays a dialog with a list of choices to the process running the current program.
| ||||||||||
| <nobr> void </nobr> | <nobr><span class="sympad"><a href="http://www.devdiv.com/android/docs/guide/developing/tools/MonkeyRunner.html#help" target="_blank">help</a></span> (<em>string</em> format) </nobr>
Displays the monkeyrunner API reference in a style similar to that of Python's
pydoc tool, using the specified format.
| ||||||||||
| <nobr><em>string</em></nobr> | <nobr><span class="sympad"><a href="http://www.devdiv.com/android/docs/guide/developing/tools/MonkeyRunner.html#input" target="_blank">input</a></span> (<em>string</em> message, <em>string</em> initialValue, <em>string</em> title, <em>string</em> okTitle, <em>string</em> cancelTitle) </nobr>
Displays a dialog that accepts input.
| ||||||||||
| <nobr> void </nobr> | <nobr><span class="sympad"><a href="http://www.devdiv.com/android/docs/guide/developing/tools/MonkeyRunner.html#sleep" target="_blank">sleep</a></span> (<em>float</em> seconds) </nobr>
Pauses the current program for the specified number of seconds.
| ||||||||||
| <nobr><code><a href="http://www.devdiv.com/android/docs/guide/developing/tools/MonkeyDevice.html" target="_blank">MonkeyDevice</a></code></nobr> | <nobr><span class="sympad"><a href="http://www.devdiv.com/android/docs/guide/developing/tools/MonkeyRunner.html#waitForConnection" target="_blank">waitForConnection</a></span> (<em>float</em> timeout, <em>string</em> deviceId) </nobr>
Tries to make a connection between the
monkeyrunner backend and the specified device or emulator.
| ||||||||||
http://www.devdiv.com/android/docs/guide/developing/tools/MonkeyRunner.html
/**
* @author 张兴业
* 邮箱:xy-zhang@163.com
* qq:363302850
*
*/
本文深入探讨了MonkeyRunner工具的静态实用方法,包括显示警告对话框、选择对话框、帮助显示、输入对话框和睡眠方法。通过具体实例,详细解释了每个方法的功能与用法。
723

被折叠的 条评论
为什么被折叠?



