class Applitools::Region

Attributes

height[RW]
left[RW]
top[RW]
width[RW]

Public Class Methods

new(left, top, height, width) click to toggle source
# File lib/eyes_selenium_ruby/eyes/region.rb, line 4
def initialize(left, top, height, width)
  @left = left
  @top = top
  @height = height
  @width = width
end

Public Instance Methods

middle_offset() click to toggle source
# File lib/eyes_selenium_ruby/eyes/region.rb, line 11
def middle_offset
  mid_x = width / 2
  mid_y = height / 2
  Selenium::WebDriver::Location.new mid_x, mid_y
end
to_hash() click to toggle source
# File lib/eyes_selenium_ruby/eyes/region.rb, line 17
def to_hash
  {
    "$type" => "Applitools.Utils.Geometry.MutableRegion, Core", left: left, top: top, height: height, width: width
  }
end