I am trying to see how monkeyrunner
works. I have python script that I want to test it on my android virtual device. I tried running below command through terminal:
monkeyrunner script.py
I am at: /Users/myusername/Library/Android/sdk/tools/bin/monkeyrunner
, python file is also in the same directory.
but it returns that: -bash: monkeyrunner: command not found
So I tried another way, and I opened monkeyrunner exec file, then tried to run script.py through it, but still giving this error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'script' is not defined
I also tried monkeyrunner script.py
inside monkeyrunner exec file but gives this error:
File "<stdin>", line 1
monkeyrunner script.py
^
SyntaxError: mismatched input 'script' expecting NEWLINE
Can anyone help, how to run a python script using androidstudio's monkeyrunner in MacOS and let me know what I am doing wrong.
Aucun commentaire:
Enregistrer un commentaire