Taking screenshots for Android apps has become super easy with the release of AndroidTool for Mac. By the way, kudos to the developer! It is such an awesome tool.

For simple apps, AndroidTool is more than enough. However, I needed to automate the process of taking screenshots (and publishing to play store) for the apps I am currently working on. I thought that would not be easy. So, I procrastinated as much as I could to avoid doing that. 😁

While reading Automating Android development by Enrique López Mañas yesterday, I realised that I have already been doing 4 out of 5 topics discussed in the post. The only thing I was not doing is “Testing”. I was allergic to Tests. However, that post inspired me to try writing tests again. 😈 So, I gave it a try this morning. After a few hours of writing tests, I was accidentally implementing this working solution to automate taking screenshots.

In this article, I will talk about how to automatically take screenshots (by writing ui tests) and publish them to play store.