I have the following HTML on a page that I am trying to test with cucumber.
<div class='try_options'>
<ul>
<li>
<div>
<img alt="" src="/images/main_page1.jpg" />
<div class='right_section'>
<p>
Feature 1
</p>
<a class='suggest_btn' href='url1'>Try Now</a>
</div>
</div>
</li>
<li>
<div>
<img alt="" src="/images/main_page2.jpg" />
<div class='right_section'>
<p>
Feature 2
</p>
<a class='suggest_btn' href='url2'>Try Now</a>
</div>
</div>
</li>
<li>
<div>
<img alt="" src="/images/main_page3.jpg" />
<div class='right_section'>
<p>
Feature 3
</p>
<a class='suggest_btn' href='url3'>Try Now</a>
</div>
</div>
</li>
<li>
<div>
<img alt="" src="/images/main_page4.jpg" />
<div class='right_section'>
<p>
Feature 4
</p>
<a class='suggest_btn' href='url4'>Try Now</a>
</div>
</div>
</li>
</ul>
</div>
Basically, there are features, each with a "Try Now" link. I want to test if clicking on the link takes me to the page for the respective feature.
I found a simalar step implementation here, but there is something wrong with the XPATH. Any help would be much appreciated.