class Watir::TableCell
Public Instance Methods
column_header()
click to toggle source
# File lib/watir/elements/table_cell.rb, line 3 def column_header current_row = parent(tag_name: 'tr') header_row(current_row, index: previous_siblings.size).text end
sibling_from_header(opt)
click to toggle source
# File lib/watir/elements/table_cell.rb, line 8 def sibling_from_header(opt) current_row = parent(tag_name: 'tr') header = header_row(current_row, opt) index = header.previous_siblings.size self.class.new(current_row, tag_name: 'td', index: index) end
Private Instance Methods
header_row(current_row, opt)
click to toggle source
# File lib/watir/elements/table_cell.rb, line 18 def header_row(current_row, opt) table = parent(tag_name: 'table') header_row = table.tr table.cell_size_check(header_row, current_row) header_type = table.th.exist? ? 'th' : 'tr' opt[:tag_name] = header_type Watir.tag_to_class[header_type.to_sym].new(header_row, opt) end