Sha256: 24be5c6a89fa886126c7e14d7577b4b0b3371d29c7513f949395029c6550be6f

Contents?: true

Size: 746 Bytes

Versions: 2

Compression:

Stored size: 746 Bytes

Contents

module PageObject
  module Elements
    class CheckBox < Element

      def initialize(element, platform)
        @element = element
        include_platform_for platform
      end

      protected
      
      def include_platform_for platform
        super
        if platform[:platform] == :watir
          require 'page-object/platforms/watir/check_box'
          self.class.send :include, PageObject::Platforms::Watir::CheckBox
        elsif platform[:platform] == :selenium
          require 'page-object/platforms/selenium/check_box'
          self.class.send :include, PageObject::Platforms::Selenium::CheckBox
        else
          raise ArgumentError, "expect platform to be :watir or :selenium"
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
page-object-0.2.5 lib/page-object/elements/check_box.rb
page-object-0.2.4 lib/page-object/elements/check_box.rb