Search code examples
androidmonkeyrunner

Can't run monkeyrunner recorder


I'm trying to use monkeyrunner for my project. As I understood there are 2 basic scripts for that:

monkey_recorder.py: https://android.googlesource.com/platform/sdk/+/ics-mr0/monkeyrunner/scripts/monkey_recorder.py

monkey_playback.py: https://android.googlesource.com/platform/sdk/+/ics-mr0/monkeyrunner/scripts/monkey_playback.py

So, monkey_recorder.py is for recording actions, and monkey_playback.py is for reproducing these actions.

I found here, that I can run recorder with this line:

./monkeyrunner monkey_recorder.py

I tried to execute this command from this directory:

/Users/user/programs/android-sdk-macosx/tools

And I got this error:

iMac-Developer-2:tools user$ ./monkeyrunner monkey_recorder.py
Can't open specified script file
Usage: monkeyrunner [options] SCRIPT_FILE

    -s      MonkeyServer IP Address.
    -p      MonkeyServer TCP Port.
    -v      MonkeyServer Logging level (ALL, FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, OFF)

So, I expected, that this window will be opened:

enter image description here

OS: OS X Yosemite, v10.10.5

Please, help me to solve this problem.
Thanks.


Solution

  • Give AndroidViewClient/culebra a try. It provides similar functionality with the big advantage of being able to generate plain python unit tests or scripts.

    Culebra UI describes the UI similar to monkey_recorder.py.