title: Cucumber Xpath selector
body: <p>I have the following HTML on a page that I am trying to test with cucumber.</p>
  
  <pre><code>&lt;div class='try_options'&gt;
    &lt;ul&gt;
      &lt;li&gt;
        &lt;div&gt;
          &lt;img alt="" src="/images/main_page1.jpg" /&gt;
          &lt;div class='right_section'&gt;
  
            &lt;p&gt;
              Feature 1
            &lt;/p&gt;
            &lt;a class='suggest_btn' href='url1'&gt;Try Now&lt;/a&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;div&gt;
          &lt;img alt="" src="/images/main_page2.jpg" /&gt;
          &lt;div class='right_section'&gt;
  
            &lt;p&gt;
              Feature 2
            &lt;/p&gt;
            &lt;a class='suggest_btn' href='url2'&gt;Try Now&lt;/a&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;div&gt;
          &lt;img alt="" src="/images/main_page3.jpg" /&gt;
          &lt;div class='right_section'&gt;
  
            &lt;p&gt;
              Feature 3
            &lt;/p&gt;
            &lt;a class='suggest_btn' href='url3'&gt;Try Now&lt;/a&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;div&gt;
          &lt;img alt="" src="/images/main_page4.jpg" /&gt;
          &lt;div class='right_section'&gt;
  
            &lt;p&gt;
              Feature 4
            &lt;/p&gt;
            &lt;a class='suggest_btn' href='url4'&gt;Try Now&lt;/a&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>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.</p>
  
  <p>I found a simalar step implementation <a href="https://stackoverflow.com/questions/4248889/cucumber-selecting-an-element-from-a-table-for-deletion-or-addition/7618578#7618578">here</a>, but there is something wrong with the XPATH. Any help would be much appreciated.</p>