Hi, I am using the following and works. However my question is if there simple way to define these xpaths?
When /^I click the first View Details button$/ do @browser.button(:xpath, "/html/body/div[@id='container']/div[@id='wrapper']/div[@id='content']/div[@class='puppy_list'][1]/div[@class='list_line_odd']/div[@class='view']/form[@class='button_to']/div/input[@class='rounded_button']").click() end When /^I click the second View Details button$/ do @browser.button(:xpath, "/html/body/div[@id='container']/div[@id='wrapper']/div[@id='content']/div[@class='puppy_list'][2]/div[@class='list_line_even']/div[@class='view']/form[@class='button_to']/div/input[@class='rounded_button']").click() end Kind Regards, Cristina -- -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected] --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
