lib/appium_lib/common/helper.rb in appium_lib-0.5.4 vs lib/appium_lib/common/helper.rb in appium_lib-0.5.5
- old
+ new
@@ -39,9 +39,14 @@
end
end
result
end
+ # Return block.call and ignore any exceptions.
+ def ignore &block
+ begin; block.call; rescue; end
+ end
+
# Check every 0.5 seconds to see if block.call returns true. nil is considered a failure.
# Give up after 30 seconds.
# @param max_wait [Integer] the maximum time in seconds to wait for
# @param interval [Float] the time in seconds to wait after calling the block
# @param block [Block] the block to call
\ No newline at end of file