class TestCentricity::AppSwitch

Public Class Methods

new(name, parent, locator, context) click to toggle source
Calls superclass method TestCentricity::AppUIElement::new
# File lib/testcentricity/app_elements/switch.rb, line 3
def initialize(name, parent, locator, context)
  super
  @type = :switch
end

Public Instance Methods

off() click to toggle source
# File lib/testcentricity/app_elements/switch.rb, line 20
def off
  obj = element
  object_not_found_exception(obj)
  obj.click if obj.get_value == 1
end
on() click to toggle source
# File lib/testcentricity/app_elements/switch.rb, line 14
def on
  obj = element
  object_not_found_exception(obj)
  obj.click unless obj.get_value == 1
end
on?() click to toggle source
# File lib/testcentricity/app_elements/switch.rb, line 8
def on?
  obj = element
  object_not_found_exception(obj)
  obj.get_value == 1
end