maestro icon indicating copy to clipboard operation
maestro copied to clipboard

Command to take screenshots

Open bobatsar opened this issue 3 years ago • 3 comments

Is there any command planned to take screenshots? This would be very handy to document changes between different versions of an app.

bobatsar avatar Aug 31 '22 22:08 bobatsar

That would be relatively easy to add, so we will address this soon 👍

dmitry-zaitsev avatar Sep 01 '22 13:09 dmitry-zaitsev

@dmitry-zaitsev we can use dadb to take screenshots via adb. I do think that we can go with something like this

adb shell screencasts -p /sdcard/$name adb pull /sdcard/$name $opt adb shell em /sdcard/$name

ca-ke avatar Sep 01 '22 13:09 ca-ke

@ca-ke indeed, that is more or less how it would go. If you like to give it a try, I can guide you through the implementation steps

dmitry-zaitsev avatar Sep 01 '22 13:09 dmitry-zaitsev

@dmitry-zaitsev and @ca-ke do you folks have a DSL in mind?

ragunathjawahar avatar Sep 09 '22 16:09 ragunathjawahar

Something like:

- takeScreenshot: {file name}

dmitry-zaitsev avatar Sep 09 '22 16:09 dmitry-zaitsev

Good news - this is now available in 1.7.0: https://maestro.mobile.dev/reference/take-screenshot

Credit for Android implementation goes to @ragunathjawahar , thank you!

dmitry-zaitsev avatar Sep 16 '22 17:09 dmitry-zaitsev

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue. Thank you for helping keep us our issue tracker clean!

github-actions[bot] avatar Jul 11 '24 18:07 github-actions[bot]