title: Ruby on Rails Capybara::Ambiguous: Ambiguous match
body: <p>I'm very new to rails and still learning it. Now I got the test failure message like this:</p>
  
  <pre><code>1) LayoutLinks should have the right links on the layout
   Failure/Error: click_link("Help")
   Capybara::Ambiguous:
     Ambiguous match, found 2 elements matching link "Help"
   # ./spec/requests/layout_links_spec.rb:47:in `block (2 levels) in &lt;top (required)&gt;'
  </code></pre>
  
  <p>because I have two identical "help" links on my homepage but it seems the test thinks it's an ambiguous match and I want it to test both of them the same way because the links direct to the same page.</p>
  
  <p>Actually there are several solutions on the site but most of them are pretty complicated to me since I'm very new, so can anyone give me the simpliest solution to it? Thanks in advance.</p>
  
  <p>Updated:</p>
  
  <p>There's nothing complicated in my view and spec. I'm still learning everything.</p>
  
  <p>Here's my spec</p>
  
  <pre><code>        visit root_path
          expect(page).to have_title("Home")      
          click_link("About")
          expect(page).to have_title("About")
          click_link("Contact")
          expect(page).to have_title("Contact")
          click_link("Help")
          expect(page).to have_title("Help")
  </code></pre>
  
  <p>Here's my header partial in the layout</p>
  
  <pre><code>&lt;header&gt;
    &lt;nav class="round"&gt;
      &lt;ul&gt;
          &lt;li&gt;&lt;%= link_to "Home", root_path %&gt;&lt;/li&gt;
          &lt;li&gt;&lt;%= link_to "Help", help_path %&gt;&lt;/li&gt;
          &lt;li&gt;&lt;%= link_to "Sign in", "#" %&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/nav&gt;
  &lt;/header&gt;
  </code></pre>
  
  <p>And here's my footer partial in the layout</p>
  
  <pre><code>&lt;footer&gt;
    &lt;nav class="round"&gt;
      &lt;ul&gt;
          &lt;li&gt;&lt;%= link_to "About", about_path %&gt;&lt;/li&gt;
          &lt;li&gt;&lt;%= link_to "Contact", contact_path %&gt;&lt;/li&gt;
          &lt;li&gt;&lt;%= link_to "Help", help_path %&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/nav&gt;
  &lt;/footer&gt;
  </code></pre>
  
  <p>Note that there are two sepearte help links in the two partial, which are identical.</p>