Screenshot Automation
Automate mobile app screenshots effortlessly using Appetize - Save time on releases, better quality assurance, improved customer support and more!
Overview
Screenshot automation refers to the process of automatically capturing screenshots of your application's screens without any manual interaction required from a user.
Screenshot automation can serve various purposes, including:
Reporting and Documentation
User Experience Research and A/B Testing
Testing and Quality Assurance
Automated screenshots can be used to verify the visual appearance and layout of an application under different scenarios (e.g. different languages, locales, orientations, device types etc.)
By making use of Playwright, you can write Visual Comparison (Snapshot) tests to verify that screens are rendered as expected whenever a new build/pull request (or other condition) occurs.
For more information see Screenshot Comparisons under our Writing Tests article.
Apple AppStore and Google PlayStore Submissions
Both Apple and Google (and other App stores) have specific requirements for screenshot submissions that includes submitting compelling images that accurately represent the app's features.
Screenshot automation offers substantial advantages in this context. By automating the screenshot capture process, developers can automatically generate the required images for all their app features on all the supported device types and in the correct locale and language.
To get started:
1. Gather the requirements of the screenshots
Determine the key features that you would like to capture in your screenshots
If the app supports multiple languages and locales, plan for localised screenshots to cater to the different regions/stores.
Decide on the specific device types and screen sizes you want to capture screenshots for. See PlayStore Screenshot guidelines and AppStore Screenshot guidelines for assistance on recommended device types.
Consider capturing screenshots in both portrait and/or landscape orientations, depending on the app's responsive design.
2. Set up our Javascript SDK
In order to take screenshots of the device session, you will need to make use of our Javascript SDK. See our Getting Started page for more info on how to get that set up.
3. Build out an object/structure that would match your requirements
For illustrative purposes, lets imagine the following requirements:
1 iOS App
7 devices (e.g. iPhone 14 Pro on iOS 18, iPhone 12 on iOS 17 etc.)
4 Features/Screens
3 Languages (English, German and French)
1 Android App
7 Devices (e.g. Pixel 7 on Android 13, Galaxy Tab S7 on Android 12)
4 Features/Screens
3 Languages (English, German and French)
A structure matching those requirements could look like this:
4. Navigate to appropriate screen/feature
In the above structure, we've defined an asynchronous function called playbackActions that we can call to navigate to a particular screen/feature in our app.
To define the steps to navigate to the particular screen, you can make use of all our automation functions available in our Javascript SDK. See Touch interactions and API Reference for more information. A sample screen navigation could look like this:
5. Putting it all together
Now that we have all the configurations and steps needed to take all the screenshots required, lets put it all together by iterating over each of them:
Last updated