Class: Watir::TableRow

Inherits:
Element show all
Includes:
TableCellsContainer
Defined in:
lib/watir-classic/table.rb

Constant Summary

Constants inherited from Element

Element::TO_S_SIZE

Instance Attribute Summary

Attributes inherited from Element

#container

Attributes included from Container

#activeObjectHighLightColor, #page_container, #type_keys, #typingspeed

Instance Method Summary collapse

Methods included from TableCellsContainer

#cell, #cells

Methods inherited from Element

#<=>, #__ole_inner_elements, #activeObjectHighLightColor, #assert_enabled, #assert_exists, #attribute_value, #click, #click!, #create_event, #disabled?, #dispatch_event, #document, #double_click, #enabled?, #exists?, #fire_event, #flash, #focus, #focused?, #initialize, #inspect, #locate, #method_missing, #ole_object, #ole_object=, #parent, #right_click, #send_keys, #style, #tag_name, #text, #to_s, #to_subtype, #type_keys, #typingspeed, #visible?

Methods included from DragAndDropHelper

#drag_and_drop_by, #drag_and_drop_on

Methods included from Container

#__ole_inner_elements, #alert, #locator_for, #modal_dialog, #set_container, support_element, #wait

Methods included from Exception

message_for_unable_to_locate

Methods included from ElementExtensions

#present?, #wait_until_present, #wait_while_present, #when_present

Constructor Details

This class inherits a constructor from Watir::Element

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Watir::Element

Instance Method Details

#[](index) ⇒ Object

Returns an element from the row as a TableCell object



197
198
199
200
201
202
203
# File 'lib/watir-classic/table.rb', line 197

def [](index)
  assert_exists
  if cells.length <= index
    raise UnknownCellException, "Unable to locate a cell at index #{index}" 
  end
  return cells[index]
end

#column_countObject



205
206
207
208
# File 'lib/watir-classic/table.rb', line 205

def column_count
  assert_exists
  cells.length
end

#eachObject

this method iterates through each of the cells in the row. Yields a TableCell object



191
192
193
194
# File 'lib/watir-classic/table.rb', line 191

def each
  locate
  cells.each {|cell| yield cell}
end