Sha256: 998b015729741c017bf9557bb5dda0c94d3358bcae1a061b1dcd9e53d024077f

Contents?: true

Size: 758 Bytes

Versions: 3

Compression:

Stored size: 758 Bytes

Contents

module PageObject
  module Elements
    class TableRow < 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_row'
          self.class.send :include, PageObject::Platforms::WatirTableRow
        elsif platform[:platform] == :selenium
          require 'page-object/platforms/selenium_table_row'
          self.class.send :include, PageObject::Platforms::SeleniumTableRow
        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_row.rb
page-object-0.0.3 lib/page-object/elements/table_row.rb
page-object-0.0.2 lib/page-object/elements/table_row.rb