You can use AndroidViewClient / culebra , which is almost a replacement for monkeyruner , but it is pure python.
I made changes to the script to show that
#! /usr/bin/env python
In addition, you can use the Culebra GUI and automatically generate such scripts (or even unittests) point by point and by clicking on the user interface.
source share