Is there any method in ruby, that i can use to take a screenshot in appium?
I am creating a framework in ruby with cucumber, for android automation using appium. Currently I am creating a screenshot using adb
system('adb shell screencap -p /sdcard/screencap.png')
system('adb pull /sdcard/screencap.png')
This appears amateur and doesnt work, when i run all the TC's as the screenshot is created with the name screencap that keeps getting replaced.
I am using appium_lib.
Any help on how to get screenshot in dynamic name or preferably with the scenario name tagged in it?