class Applitools::Appium::Screenshot
Attributes
device_pixel_ratio[R]
status_bar_height[R]
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
# File lib/applitools/appium/screenshot.rb, line 9 def initialize(*args) options = Applitools::Utils.extract_options!(args) @status_bar_height = options[:status_bar_height] || 0 @device_pixel_ratio = options[:device_pixel_ratio] || 1 super end
Public Instance Methods
convert_location(location, _from, _to)
click to toggle source
# File lib/applitools/appium/screenshot.rb, line 24 def convert_location(location, _from, _to) raise 'Applitools::Appium::Screenshot is an abstract class.' \ ' You should implement :convert_location method in a descendant class.' end
sub_screenshot(region, _coordinate_type, _throw_if_clipped = false, _force_nil_if_clipped = false)
click to toggle source
# File lib/applitools/appium/screenshot.rb, line 16 def sub_screenshot(region, _coordinate_type, _throw_if_clipped = false, _force_nil_if_clipped = false) self.class.new( Applitools::Screenshot.from_image( image.crop(region.x, region.y, region.width, region.height) ) ) end