Sha256: a860e24a3831d196144f0966c32c65b4e7be0fe9c875c39b47173441ee7de576

Contents?: true

Size: 637 Bytes

Versions: 10

Compression:

Stored size: 637 Bytes

Contents

module Fluent
  module Platforms
    module WatirWebDriver
      module Table

        def [](index)
          index = find_index_by_title(index) if index.kind_of?(String)
          return nil unless index
          initialize_row(web_element[index], :platform => :watir_webdriver)
        end
        
        def rows
          web_element.wd.find_elements(:xpath, row_xpath).size
        end

        def find_index_by_title(row_title)
          web_element.rows.find_index do |row|
            row.cells.any? { |col| col.text.include? row_title }
          end
        end
        
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fluent-0.7.5 lib/fluent/platform_watir/platform_web_elements/table.rb
fluent-0.7.4 lib/fluent/platform_watir/platform_web_elements/table.rb
fluent-0.7.3 lib/fluent/platform_watir/platform_web_elements/table.rb
fluent-0.7.2 lib/fluent/platform_watir/platform_web_elements/table.rb
fluent-0.7.1 lib/fluent/platform_watir/platform_web_elements/table.rb
fluent-0.7.0 lib/fluent/platform_watir/platform_web_elements/table.rb
fluent-0.6.0 lib/fluent/platform_watir/platform_web_elements/table.rb
fluent-0.5.0 lib/fluent/platform_watir/platform_web_elements/table.rb
fluent-0.4.0 lib/fluent/platform_watir/platform_web_elements/table.rb
fluent-0.3.0 lib/fluent/platform_watir/platform_web_elements/table.rb