Class: Watir::TableRow
- Defined in:
- lib/watirmark/extensions/webdriver_extensions.rb
Instance Method Summary collapse
Instance Method Details
#column(what) ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/watirmark/extensions/webdriver_extensions.rb', line 67 def column(what) column = 0 parent.th(:text => what).when_present.parent.cells.each do |cell| if what.kind_of? String return self[column] if cell.text == what else return self[column] if cell.text =~ what end column +=1 unless cell.text.strip == '' end raise Watir::Exception::UnknownObjectException, "unable to locate column, using '#{what}'" end |
#each ⇒ Object
63 64 65 |
# File 'lib/watirmark/extensions/webdriver_extensions.rb', line 63 def each cells.each { |x| yield x } end |