lib/calabash-android/operations.rb in calabash-android-0.9.19 vs lib/calabash-android/operations.rb in calabash-android-0.9.20

- old
+ new

@@ -156,10 +156,14 @@ default_device.shutdown_test_server end def screenshot_embed(options={:prefix => nil, :name => nil, :label => nil}) path = default_device.screenshot(options) - embed(path, "image/png", options[:label] || File.basename(path)) + begin + embed(path, "image/png", options[:label] || File.basename(path)) + rescue NoMethodError + attach(path, "image/png") + end end def screenshot(options={:prefix => nil, :name => nil}) default_device.screenshot(options) end