here's a snippet that looks for a link named 'select', you can adjust
to your own situation
The first picks the n-th row (could obviously be generalized),
the second picks the row based on some content
When /^(?:I )?select the (.+) row of the "(.+)" table$/ do |which,
table|
case which
when 'first'
click_link_within 'table tr td', 'select'
when 'second'
click_link_within 'table tr+tr td', 'select'
else
puts "STEP ERROR: dont know #{which} row"
end
end
When /^(?:I )?select the row of the "(.+)" table containing "(.*)"$/
do |table, text|
selector = "//table//tr//td[contains(.,'#{text}')]//.."
click_link_within selector, 'select'
end
-- jon linowes
parkerhill technology group llc
jona...@parkerhill.com
office:
603-838-2884
tech blog:
http://vaporbase.com
personal blog:
http://jon.linow.es
twitter: @linojon