简体   繁体   中英

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:

在此处输入图片说明

OS: OS X Yosemite, v10.10.5

Please, help me to solve this problem.
Thanks.

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 .

Try to provide the absolute path to your python script if that doesn't work verify if it's an executable or not.

if it's not executable you can provide the execution permession with chmod

chmod +x filename.py

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM