Sha256: 39aa49178ab8560704d0a7de40e063f0a275b31c9e51228073c1fd7fbf5207ed

Contents?: true

Size: 554 Bytes

Versions: 2

Compression:

Stored size: 554 Bytes

Contents

module Symbiont
  module WebObjects

    class CheckBox < WebObject

      def initialize(web_object)
        @web_object = web_object
      end

      def check
        web_object.set
      end

      def uncheck
        web_object.clear
      end

      def checked?
        web_object.set?
      end

      def self.usable_selectors
        super + [:value, :label]
      end

    end # class: CheckBox
    
    ::Symbiont::WebObjects.class_for_type[:checkbox] = ::Symbiont::WebObjects::CheckBox
    
  end # module: WebObjects
end # module: Symbiont

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
symbiont-0.2.1 lib/symbiont/web_objects/checkbox.rb
symbiont-0.2.0 lib/symbiont/web_objects/checkbox.rb