Search code examples
androidmonkeyrunner

Saving Monkeyrunner captured screenshot to internal storage?


Is there any way of saving the screenshot taken by MonkeyRunner's device.takeSnapshot() to the phone's internal storage itself? This example I have seen on the net only saves it to the computer where the MonkeyRunner command is executed.

http://www.vogella.com/tutorials/AndroidTesting/article.html#monkeyrunner_example


Solution

  • Try using:

    device.shell('screencap -p /sdcard/sc.png')
    

    this will save the screen capture to your sdcard.