class Applitools::Calabash::EyesCalabashIosScreenshot

Public Instance Methods

convert_region_location(region, from, to) click to toggle source
# File lib/applitools/calabash/eyes_calabash_ios_screenshot.rb, line 7
def convert_region_location(region, from, to)
  case from
  when DRIVER
    case to
    when SCREENSHOT_AS_IS
      region.scale_it!(scale_factor)
    else
      raise Applitools::EyesError, "from: #{from}, to: #{to}"
    end
  when CONTEXT_RELATIVE
    case to
    when SCREENSHOT_AS_IS
      region
    else
      raise Applitools::EyesError, "from: #{from}, to: #{to}"
    end
  else
    raise Applitools::EyesError, "from: #{from}, to: #{to}"
  end
  region
end