lib/calabash-android/operations.rb in calabash-android-0.0.18 vs lib/calabash-android/operations.rb in calabash-android-0.0.19
- old
+ new
@@ -14,10 +14,10 @@
$stdout.puts "#{Time.now.strftime("%Y-%m-%d %H:%M:%S")} - #{message}" if (ARGV.include? "-v" or ARGV.include? "--verbose")
end
def take_screenshot
path = ENV["SCREENSHOT_PATH_PREFIX"] || "results"
- FileUtils.mkdir_p path unless Dir.exists? path
+ FileUtils.mkdir_p path unless File.exist? path
filename_prefix = FeatureNameMemory.feature_name.gsub(/\s+/, '_').downcase
begin
Timeout.timeout(30) do
file_name = "#{path}/#{filename_prefix}_#{StepCounter.step_line}.png"
log "Taking screenshoot to #{file_name} from device: #{ENV['ADB_DEVICE_ARG']}"