I am using aws
device farm for running my android tests, and we are using espresso framework. Some of the tests are failing today, and I want to take screenshots if my test fails. I have gone through your documentation but couldn't find anything concrete. This is what I know so far:
You can take screenshots as part of your Android UI Automator tests.
To take a screenshot, call the takeScreenshot method (for example, takeScreenshot("/sdcard/uiautomator-screenshots/home-screen-1234.png");).
Note: All screenshots must be stored in the
/sdcard/uiautomator-screenshots directory
. You must specify the full path (including the file name) of the screenshot to be stored. ThetakeScreenshot
method works for API Levels 17 and higher only. For API Level 16, UI Automator is supported, but screenshots are not supported.
Is there any way I can configure aws device
farm to take screenshots automatically without calling the function in test? Is it supported? Also, I couldn't find any screenshot related commands. I will really appreciate if someone could explain the steps required to screenshot. Thank you