lib/calabash-android/operations.rb in calabash-android-0.3.3.pre3 vs lib/calabash-android/operations.rb in calabash-android-0.3.3.pre5
- old
+ new
@@ -241,10 +241,11 @@
@@screenshot_count ||= 0
path = "#{prefix}#{name}_#{@@screenshot_count}.png"
if ENV["SCREENSHOT_VIA_USB"] == "true"
- screenshot_cmd = "java -jar #{File.join(File.dirname(__FILE__), 'lib', 'screenShotTaker.jar')} #{path}"
+ device_args = "-s #{@serial}" if @serial
+ screenshot_cmd = "java -jar #{File.join(File.dirname(__FILE__), 'lib', 'screenShotTaker.jar')} #{path} #{device_args}"
log screenshot_cmd
raise "Could not take screenshot" unless system(screenshot_cmd)
else
begin
res = http("/screenshot")