Hello All,
I am new to Ruby/Cucumber and I am trying to iterate through the puppy adoption process and selelct a different View Detail button for each iteration. When I add the code, my tests are failing because the script see the View Detail button as a number. Here's the code I wrote to attempt this. Any ideas?
def adopt_puppy_number(num)
@browser.button(:value => 'View Details', :index => num - 1).click
end
When(/^I click the "([^"]*)" button$/) do |num|
adopt_puppy_number(num)
end