android - 一只猴子到底在搞什么我的 Android 手机?

标签 android testing monkeyrunner

通过查看 Android api,我发现了一个方法调用 isUserAMonkey() , 表示如果手机被猴子弄乱,它会返回 true

这是个玩笑,还是用来干什么的?

最佳答案

monkeyrunner ,它会给你答案。

引自文档:

The monkeyrunner tool provides an API for writing programs that control an Android device or emulator from outside of Android code. With monkeyrunner, you can write a Python program that installs an Android application or test package, runs it, sends keystrokes to it, takes screenshots of its user interface, and stores screenshots on the workstation. The monkeyrunner tool is primarily designed to test applications and devices at the functional/framework level and for running unit test suites, but you are free to use it for other purposes.

因此,如果您使用 Monkeyrunner 运行一个包,那么此函数将返回 true。

关于android - 一只猴子到底在搞什么我的 Android 手机?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7546402/

相关文章:

Android TCP 发送文件。 Android 客户端将图像发送到 Java 服务器。无法发送图像。该怎么办?

javascript - 如何在具有特殊类的表中选择第 n 个 html 元素?

android - 无法访问 jarfile ..\framework\monkeyrunner-25.3.2.jar

android - 我可以用 Monkeyrunner 读取按钮上的标签吗

android - 用 MonkeyRunner 切换屏幕模式?

android - 构造函数 ArrayAdapter<string> 未定义

android - android 模拟器上的 android 终端模拟器中的 sudo 访问(开发)

java - Android Firebase OnDataChange 未触发

java - 仅在测试时运行代码

testing - Selenium:遍历下拉列表中的每个 <option>