lib/calabash-android/wait_helpers.rb in calabash-android-0.9.16 vs lib/calabash-android/wait_helpers.rb in calabash-android-0.9.17
- old
+ new
@@ -59,10 +59,15 @@
# Validate after taking screenshot
if res
FileUtils.rm_f(path)
return res
else
- embed(path, 'image/png', msg)
+ begin
+ embed(path, 'image/png', msg)
+ rescue => NoMethodError
+ attach(path, 'image/png')
+ end
+
raise wait_error(msg)
end
end
def wait_poll(opts, &block)