все!
Возможно, у меня есть стол
<tabel>
<tr><td><input type=text/></td><td><input type=text/></td></tr>
<tr><td><input type=text/></td><td><input type=text/></td></tr>
<tr><td><input type=text/></td><td><input type=text/></td></tr>
<tr><td><input type=text/></td><td><input type=text/></td></tr>
</table>
Я хочу заполнить их циклом с определением шага огурца, как это
table.hashes.each do |hash|
within(:xpath,"//div[@id='cycle_form']/table/tr#{table.hashes.index(hash)}") do
fill_in("schedule_of_working_new_cycle_attributes__day", :with => hash['day'])
fill_in("schedule_of_working_new_cycle_attributes__hour", :with => hash['hour'])
fill_in("schedule_of_working_new_cycle_attributes__hour_night", :with => hash['hour_night'])
end
end
Я получаю @ Невозможно найти xpath "// div [@ id = 'cycle_form'] / table / tr [0]" @
Как получить коллекцию элементов с капибарой?