I am a newbie in using cucumber with capybara. I need to click on links displayed after hovering over certain elements of the web page using capybara
e.g. att.com
1. scenario is on hovering over Personal click on att.com
2. another scenario on hover over Shop --Bundles - click on Popular Bundles
How can this be accomplished using hover and click methods of capybara or is there any other method to make this work.
Option tried are
find(:xpath, ".//*[@id='ge5p_z2_p1001']").hover
find(:xpath, ".//*[@id='ge5p_z2_t1038']").click
But it complains unable to find xpath
Well there are two options here, dependent upon what your testing
1) If you want to test that the hover event triggers and then the links are clickable then try
2) If you just want to test that the dropdown links take you to the correct page then treat them as links
let me know how you get on with this, I haven't tested it yet but should sort you out