Skip to content
bret edited this page Sep 13, 2010 · 5 revisions

WatirCraft offers specialized table elements that make manipulating and using
tables much easier.

To add a table element to a page, you must first add an element to wrap the entire table,
then the table and its fields:


element(:items_table) {@browser.table(:index, 1)}
table(:items) do
field(:quantity) {@row.cell(:index, 1)}
field(:description) {@row.cell(:index, 2)}
end
field(:total) {@browser.cell(:id, ‘totalcell’)}
Clone this wiki locally