title: How to locating similar HTML elements in Watir using Ruby
body: <p>I am trying to click links on a page and able to do only the first one. There are four more having similar code, but it says it cannot locate the other four. </p>
  
  <p>This is the line of code that works:</p>
  
  <pre><code>@browser.div(class:'ms-vb itx').link(:text =&gt;'Rapid Alignment').click 
  </code></pre>
  
  <p>This is one of the four that does not work:</p>
  
  <pre><code>@browser.div(class:'ms-vb itx').link(:text =&gt;'Design Develop Integrate and Test').click
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div class="ms-vb itx" onmouseover="OnItem(this)" CTXName="ctx586" id="1" Field="LinkTitle" Perm="0xb008031061" EventType=""&gt;&lt;a onfocus="OnLink(this)" href="asdm.nwie.net/_layouts/15/…; onclick="EditLink2(this,586);return false;" target="_self"&gt;Rapid Alignment&lt;/a&gt;&lt;/div&gt;
  
  &lt;div class="ms-vb itx" onmouseover="OnItem(this)" CTXName="ctx586" id="3" Field="LinkTitle" Perm="0xb008031061" EventType=""&gt;&lt;a onfocus="OnLink(this)" href="asdm.nwie.net/_layouts/15/…; onclick="EditLink2(this,586);return false;" target="_self"&gt;Design Develop Integrate and Test&lt;/a&gt;&lt;/div&gt;
  </code></pre>