Sha256: 98b570e5487eeec4303cbddcf60fb2ba13048beecfe2b6d45498ff35bde37271

Contents?: true

Size: 747 Bytes

Versions: 3

Compression:

Stored size: 747 Bytes

Contents

module PageObject
  module Elements
    class Table < 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_table'
          self.class.send :include, PageObject::Platforms::WatirTable
        elsif platform[:platform] == :selenium
          require 'page-object/platforms/selenium_table'
          self.class.send :include, PageObject::Platforms::SeleniumTable
        else
          raise ArgumentError, "expect platform to be :watir or :selenium"          
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
page-object-0.0.4 lib/page-object/elements/table.rb
page-object-0.0.3 lib/page-object/elements/table.rb
page-object-0.0.2 lib/page-object/elements/table.rb