diff --git a/ruby-gem/CHANGES.txt b/ruby-gem/CHANGES.txt index 262d253e7..0b51e842d 100644 --- a/ruby-gem/CHANGES.txt +++ b/ruby-gem/CHANGES.txt @@ -1,3 +1,7 @@ +0.2.9: + Moving to the new http screenshot method. + screenshottaker.jar and the use of ddmlib will be phased out. + 0.2.8: Added /screenshot to test server. Calabash will now kill the test server at exit. diff --git a/ruby-gem/lib/calabash-android/operations.rb b/ruby-gem/lib/calabash-android/operations.rb index 764664f1a..8acec1c39 100644 --- a/ruby-gem/lib/calabash-android/operations.rb +++ b/ruby-gem/lib/calabash-android/operations.rb @@ -195,8 +195,10 @@ def take_screenshot begin Timeout.timeout(30) do file_name = "#{path}/#{filename_prefix}_#{StepCounter.step_line}.png" - log "Taking screenshoot to #{file_name} from device: #{@serial}" - system("java -jar #{File.dirname(__FILE__)}/lib/screenShotTaker.jar #{file_name} #{device_args}") + image = http("/screenshot") + open(file_name ,"wb") { |file| + file.write(image) + } log "Screenshot stored in: #{file_name}" end rescue Timeout::Error diff --git a/ruby-gem/lib/calabash-android/version.rb b/ruby-gem/lib/calabash-android/version.rb index f494137bf..e8869ef7d 100644 --- a/ruby-gem/lib/calabash-android/version.rb +++ b/ruby-gem/lib/calabash-android/version.rb @@ -1,6 +1,6 @@ module Calabash module Android - VERSION = "0.2.8" - FRAMEWORK_VERSION = "0.2.8" + VERSION = "0.2.9" + FRAMEWORK_VERSION = "0.2.9" end end