Capybara - finding an element with Id & text or using multiple properties
<p>I have 2 links with same id 2 and different text</p>

<pre><code>&lt;li class=""&gt; 
&lt;a href="#" id="2"&gt;2&lt;/a&gt;
&lt;/li&gt;

&lt;li class=""&gt;
&lt;a href="#" id="2"&gt;Next&lt;/a&gt;
&lt;/li&gt;
</code></pre>

<p>now i wanted to write something like</p>

<pre><code>page.find_by_id("2").has_text?("2")
</code></pre>

<p>but it is not working not sure how to find the element with id = "2" &amp; text ="2"</p>

<p>I am getting error </p>

<pre><code>Capybara::Ambiguous: Ambiguous match, found 2 elements matching id "2"
</code></pre>