Sha256: a1039e6160be7e68948ad153df8d4cb91e0f18cb77d08dc1f9789c359cd7c1c0

Contents?: true

Size: 826 Bytes

Versions: 5

Compression:

Stored size: 826 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_webdriver
          require 'page-object/platforms/watir_webdriver/check_box'
          self.class.send :include, PageObject::Platforms::WatirWebDriver::CheckBox
        elsif platform[:platform] == :selenium_webdriver
          require 'page-object/platforms/selenium_webdriver/check_box'
          self.class.send :include, PageObject::Platforms::SeleniumWebDriver::CheckBox
        else
          raise ArgumentError, "expect platform to be :watir_webdriver or :selenium_webdriver"
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
page-object-0.5.4 lib/page-object/elements/check_box.rb
page-object-0.5.3 lib/page-object/elements/check_box.rb
page-object-0.5.2 lib/page-object/elements/check_box.rb
page-object-0.5.1 lib/page-object/elements/check_box.rb
page-object-0.5.0 lib/page-object/elements/check_box.rb