MonkeyRunner: more reliable screenshots in standby mode and full length?

I had lunch with the monkey - sorry, I had to try and tell this joke.

I try to achieve three things:

1) Only send key beats when my application is fully launched and loaded. How can I do this without relying on the untrustworthy MonkeyRunner.sleep(3) ?

2) How can I record screenshots for the entire length of my application (its scrollable), if at all possible?

3) Is it possible to pass parameters to my application through monkeyrunner so that these parameters can be used in the application?

Thank you all for your help.

+4
source share
1 answer

1) Only send key beats when my application is fully launched and loaded. How can I do this without relying on the untrustworthy MonkeyRunner.sleep (3)?

You will need to use the python subprocess module with adb logcat to monitor the log and view when you open your application.

2) How to capture screenshots for my complete application (its scrollable), if at all possible?

If you use this on a real device, this is not possible. If you are doing something with the emulator, just make the emulator screen as big as you need a screenshot.

3) Is it possible to transfer parameters to my application through monkeyrunner so that these parameters can be used in the application?

Yes, see the options you have here .

+6
source

All Articles