Sha256: 74915fe11e966d449e70b4b75924f9dda5deb95f3c9cf993f5766b5ada5dc4a6

Contents?: true

Size: 283 Bytes

Versions: 4

Compression:

Stored size: 283 Bytes

Contents

# encoding: utf-8
module Watir
  class Table < HTMLElement
    
    def to_a
      assert_exists
      
      trs.inject [] do |res, row|
        res << row.tds.map { |cell| cell.text }
      end
    end
    
    def [](idx)
      row(:index, idx)
    end

  end # Table
end # Watir

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
watir-webdriver-0.0.1.dev4 lib/watir-webdriver/elements/table.rb
watir-webdriver-0.0.1.dev3 lib/watir-webdriver/elements/table.rb
watir-webdriver-0.0.1.dev2 lib/watir-webdriver/elements/table.rb
watir-webdriver-0.0.1.dev lib/watir-webdriver/elements/table.rb