Troubleshooting – Screenshots on Fail

Learn how to generate screenshots on test's fail.


public class ScreenshotsOnFailTests extends AndroidTest {
    public void buttonClicked_When_CallClickMethod() {
        var button = app().create().byIdContaining(Button.class, "button");;


If it is turned on the engine will capture a screenshot in case the test failed.


If you open the testFrameworkSettings.<env>.json file, you find the screenshot properties under androidSettings section that controls this behaviour.

"screenshotsSettings": {
    "screenshotsOnFailEnabled": "true",
    "screenshotsSaveLocation": "user.home/BELLATRIX/Screenshots"

You can turn off the making of screenshots for all tests and specify where the screenshots to be saved. In the extensibility chapters read more about how you can create different screenshots engine or change the saving strategy.