class DotDiff::Comparible::ElementComparer
Public Instance Methods
new_image_path()
click to toggle source
# File lib/dotdiff/comparible/element_comparer.rb, line 17 def new_image_path snapshot.cropped_file end
run()
click to toggle source
# File lib/dotdiff/comparible/element_comparer.rb, line 6 def run take_snapshot_and_crop if !File.exist?(snapshot.basefile) snapshot.resave_cropped_file [true, snapshot.basefile] else compare(snapshot.cropped_file) end end
Private Instance Methods
take_snapshot_and_crop()
click to toggle source
# File lib/dotdiff/comparible/element_comparer.rb, line 23 def take_snapshot_and_crop snapshot.capture_from_browser(DotDiff.hide_elements_on_non_full_screen_screenshot) snapshot.crop_and_resave(element_meta) end