Sha256: 4c8ff9877a63bbcafe3a3e76cad1ddb9abc7b97385f24d5b386503189d2e4187

Contents?: true

Size: 499 Bytes

Versions: 19

Compression:

Stored size: 499 Bytes

Contents

module TestCentricity
  class AppSwitch < AppUIElement
    def initialize(name, parent, locator, context)
      super
      @type = :switch
    end

    def on?
      obj = element
      object_not_found_exception(obj)
      obj.get_value == 1
    end

    def on
      obj = element
      object_not_found_exception(obj)
      obj.click unless obj.get_value == 1
    end

    def off
      obj = element
      object_not_found_exception(obj)
      obj.click if obj.get_value == 1
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
testcentricity-3.1.1 lib/testcentricity/app_elements/switch.rb
testcentricity-3.1.0 lib/testcentricity/app_elements/switch.rb
testcentricity-3.0.6 lib/testcentricity/app_elements/switch.rb
testcentricity-3.0.5 lib/testcentricity/app_elements/switch.rb
testcentricity-3.0.4 lib/testcentricity/app_elements/switch.rb
testcentricity-3.0.3 lib/testcentricity/app_elements/switch.rb
testcentricity-3.0.2 lib/testcentricity/app_elements/switch.rb
testcentricity-3.0.1 lib/testcentricity/app_elements/switch.rb
testcentricity-3.0.0 lib/testcentricity/app_elements/switch.rb
testcentricity-2.4.3 lib/testcentricity/app_elements/switch.rb
testcentricity-2.4.2 lib/testcentricity/app_elements/switch.rb
testcentricity-2.4.1 lib/testcentricity/app_elements/switch.rb
testcentricity-2.4.0 lib/testcentricity/app_elements/switch.rb
testcentricity-2.3.19 lib/testcentricity/app_elements/switch.rb
testcentricity-2.3.18 lib/testcentricity/app_elements/switch.rb
testcentricity-2.3.17 lib/testcentricity/app_elements/switch.rb
testcentricity-2.3.16.1 lib/testcentricity/app_elements/switch.rb
testcentricity-2.3.16 lib/testcentricity/app_elements/switch.rb
testcentricity-2.3.14 lib/testcentricity/app_elements/switch.rb