How to get screenshot for failing android test?

I’m running espresso tests on circle CI. A particular test passes on my local machine but fails on circle CI with the error:

Error performing ‘single click’ on view 'with id:

Caused by: java.lang.RuntimeException: Action will not be performed because the target view does not match one or more of the following constraints:
at least 90 percent of the view’s area is displayed to the user.

I’d like to get a screen shot so I can see what’s going on. Is there an easy way to do that?

This is because the screen sizes on your local emulator and circle ci’s emulator most likely differ.

Without needing a screenshot, you could most likely fix your issue by performing scrollTo() before performing the click() action.

Can you please send me the circle.yml file.

Im not able to run my espresso test in circleci.

Not even a single test.

Please help me configure the espresso test with circle.