class Object

Public Instance Methods

blank?() click to toggle source
# File lib/testcentricity_web/utility_helpers.rb, line 2
def blank?
  respond_to?(:empty?) ? empty? : !self
end
boolean?() click to toggle source
# File lib/testcentricity_web/utility_helpers.rb, line 10
def boolean?
  [true, false].include? self
end
click_at(x, y) click to toggle source
# File lib/testcentricity_web/web_elements/ui_elements_helper.rb, line 6
def click_at(x, y)
  right = x - (native.size.width / 2)
  top = y - (native.size.height / 2)
  driver.browser.action.move_to(native).move_by(right.to_i, top.to_i).click.perform
end
displayed?() click to toggle source
# File lib/testcentricity_web/web_elements/ui_elements_helper.rb, line 34
def displayed?
  native.displayed?
end
get_height() click to toggle source
# File lib/testcentricity_web/web_elements/ui_elements_helper.rb, line 22
def get_height
  native.size.height
end
get_width() click to toggle source
# File lib/testcentricity_web/web_elements/ui_elements_helper.rb, line 18
def get_width
  native.size.width
end
get_x() click to toggle source
# File lib/testcentricity_web/web_elements/ui_elements_helper.rb, line 26
def get_x
  native.location.x
end
get_y() click to toggle source
# File lib/testcentricity_web/web_elements/ui_elements_helper.rb, line 30
def get_y
  native.location.y
end
hover_at(x, y) click to toggle source
# File lib/testcentricity_web/web_elements/ui_elements_helper.rb, line 12
def hover_at(x, y)
  right = x - (native.size.width / 2)
  top = y - (native.size.height / 2)
  driver.browser.action.move_to(native).move_by(right.to_i, top.to_i).perform
end
present?() click to toggle source
# File lib/testcentricity_web/utility_helpers.rb, line 6
def present?
  !blank?
end