title: Different ways to click a hyper link programmatically?
body: <p>What are some other ways to programmatically click a text link on a page? The link does not have a ID and will not have one. 
  example link will look like this: </p>
  
  <pre><code>&lt;div unselectable="on" class="x-grid-cell-inner " style="text-align:left;"&gt;
  &lt;a href="file/files/now.pdf"&gt;Click Here&lt;/a&gt;   
  &lt;/div&gt;
  </code></pre>
  
  <p>Here's one way I can do it but want to know more ways to click it.</p>
  
  <pre><code>var els = document.getElementsByTagName('a');
      for (var i = 0, l = els.length; i &lt; l; i++) 
      {
         var el = els[i];
         if (el.text === 'Click Here') 
         {
             el.click()
         }
      }
  </code></pre>