'Is there a Simple Way to Take Screenshot in Espresso Android Studio for Every Test Case

Guys, I'm a beginner in Espresso and requesting for your valuable help, Can anyone share me the code with which I can take the screenshot for every tests which I executing ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source