title: Geb testing: How to click the link of a controller action?
body: <p>I am working through a segment of a Geb test for a Grails app, and can't find this in the docs (though I might be overlooking something).   How do you select and click on the link of a controller action?    Here's the form element with that has a controller action link (I had to rename some things...)</p>
  
  <p>Is it the problem of the elementId or do I need to look elsewhere?  Normally I can hit Ids with the # selector just fine.   Had a hard time finding an example in the docs.   Any help or direction is greatly appreciated.</p>
  
  <p>(Using Grails 2.4.3, Geb 9.3, and Firefox 37.0.2)</p>
  
  <p>Form item:</p>
  
  <pre><code>    &lt;li id="formItemID"&gt;
          &lt;g:link elementId="linkId" controller="controller" action="linkAction"&gt;Link Text HERE&lt;/g:link&gt;
      &lt;/li&gt;
  </code></pre>
  
  <p>Geb Test:</p>
  
  <pre><code>def "test controller action link"(){
      when:
      go linkURL here 
      $('#linkId').click()  // this won't hit
      then:
      $('.some kind of panel-heading').value('something value...')
  
  }
  </code></pre>