Class: Celerity::TableRow
- Inherits:
-
Celerity::Element
- Object
- Celerity::Element
- Celerity::TableRow
- Includes:
- Celerity::ClickableElement, Enumerable
- Defined in:
- lib/celerity/elements/table_row.rb
Overview
TableRow
Constant Summary
- TAGS =
[ Identifier.new('tr') ]
- DEFAULT_HOW =
:id
Constants inherited from Celerity::Element
ATTRIBUTES, BASE_ATTRIBUTES, CELLHALIGN_ATTRIBUTES, CELLVALIGN_ATTRIBUTES, DEFAULT_HOW, HTML_401_TRANSITIONAL, TAGS
Method Summary
- - (Object) child_cell(index) (also: #[]) Get the child cell at the given index.
- - (Object) column_count Number of cells in this row.
- - (Object) each Yields each TableCell in this row to the given block.
- - (Object) locate
Methods included from Celerity::ClickableElement
#assert_exists_and_enabled, #click, #click_and_attach, #double_click, #download, #right_click
Methods inherited from Celerity::Element
#==, #assert_exists, #attribute_string, #attribute_value, #exists?, #fire_event, #focus, #identifier_string, #initialize, #javascript_object, #method_missing, #methods, #object, #parent, #respond_to?, #selector_to_attribute, #text, #to_s, #to_xml, #visible?, #xpath
Methods included from Celerity::Container
#area, #areas, #button, #buttons, #cell, #cells, #check_box, #checkboxes, #container=, #contains_text, #dd, #dds, #div, #divs, #dl, #dls, #dt, #dts, #em, #ems, #file_field, #file_fields, #form, #forms, #frame, #frames, #h1, #h1s, #h2, #h2s, #h3, #h3s, #h4, #h4s, #h5, #h5s, #h6, #h6s, #hidden, #hiddens, #image, #images, #inspect, #label, #labels, #li, #link, #links, #lis, #map, #maps, #meta, #metas, #ol, #ols, #option, #p, #pre, #pres, #ps, #radio, #radios, #rescue_status_code_exception, #row, #rows, #select_list, #select_lists, #span, #spans, #strong, #strongs, #table, #tables, #tbodies, #tbody, #text_field, #text_fields, #tfoot, #tfoots, #th, #thead, #theads, #ths, #ul, #uls
Methods included from Celerity::ShortInspect
Constructor Details
This class inherits a constructor from Celerity::Element
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Celerity::Element
Method Details
- (Object) child_cell(index) Also known as: []
Get the child cell at the given index
27 28 29 30 31 32 33 34 35 |
# File 'lib/celerity/elements/table_row.rb', line 27 def child_cell(index) assert_exists if (index - Celerity.index_offset) >= @cells.length raise UnknownCellException, "Unable to locate a cell at index #{index}" end TableCell.new(self, :object, @cells[index - Celerity.index_offset]) end |
- (Object) column_count
Number of cells in this row.
42 43 44 45 |
# File 'lib/celerity/elements/table_row.rb', line 42 def column_count assert_exists @cells.length end |
- (Object) each
Yields each TableCell in this row to the given block.
18 19 20 21 |
# File 'lib/celerity/elements/table_row.rb', line 18 def each assert_exists @cells.each { |cell| yield TableCell.new(self, :object, cell) } end |
- (Object) locate
9 10 11 12 |
# File 'lib/celerity/elements/table_row.rb', line 9 def locate super @cells = @object.getCells if @object end |