This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Tables
WatirCraft offers specialized table definitions that make verifing and
accessing tables much easier.
To define table on 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')}
You can then test specific rows in the table:
some_page.items.row(:description => 'Pragmatic Testing').quantity.should == "3"
There are several things going on here:
- The row method of the “items” table allows you to select a specific row of
the table by reference to any of the fields defined on the table. - You can use any of the defined fields on the selected row.
Additional points:
- If no row matchs the selector, the row method will return nil.
- You can define input fields, just like with pages. This is useful, e.g.,
if there are checkboxes in the table. - You can define elements, just like with pages. This is usefule, e.g.,
if there are buttons in the table. - Index values are 1 based






