Module: Fluent::Platforms::WatirWebDriver::Table
- Defined in:
- lib/fluent/platform_watir/platform_web_elements/table.rb
Instance Method Summary collapse
Instance Method Details
#[](index) ⇒ Object
6 7 8 9 10 |
# File 'lib/fluent/platform_watir/platform_web_elements/table.rb', line 6 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 |
#find_index_by_title(row_title) ⇒ Object
16 17 18 19 20 |
# File 'lib/fluent/platform_watir/platform_web_elements/table.rb', line 16 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 |
#rows ⇒ Object
12 13 14 |
# File 'lib/fluent/platform_watir/platform_web_elements/table.rb', line 12 def rows web_element.wd.find_elements(:xpath, row_xpath).size end |