title: RequiredPageContentNotPresent error in geb 0.12.2
body: <p>I am getting the following error when trying to run a geb test as a part of a Maven build in Eclipse:</p>
  
  <pre><code>Scenario: Perform login  Time elapsed: 0.009 sec  &lt;&lt;&lt; FAILURE!
  geb.error.RequiredPageContentNotPresent: The required page content 'userName - SimplePageContent (owner: LoginPage, args: [], value: null)' is not present
  </code></pre>
  
  <p>The only pattern to the error seems to be that it is thrown every time I try to use the geb selector to select/find some page content, but using the selector should work out-of-the-box, right?</p>
  
  <p>I am using the following tools and libraries:</p>
  
  <ul>
  <li>Eclipse Mars Java EE ID (version: 4.5.1)</li>
  <li>geb (version 0.12.2)</li>
  <li>Selenium (version 2.48.2)</li>
  <li>Groovy (version 2.4.5)</li>
  <li>Cucumber (version 1.2.4)</li>
  </ul>
  
  <p>Here is my .feature file:</p>
  
  <pre><code>Feature: Login
  
    Scenario: Perform login
      Given the user is at the login page
      When the user enters &lt;some_uid&gt; and &lt;some_pwd&gt;
      Then the user should be logged in
  </code></pre>
  
  <p>Here is my steps definition:</p>
  
  <pre><code>package stepdefs
  
  import pages.LoginPage
  
  import static cucumber.api.groovy.EN.*
  
  Given(~"the user is at the login page") { -&gt;
      to LoginPage
      assert at(LoginPage)
  }
  
  When(~"the user enters (.*) (.*)") { user, password -&gt;
      at LoginPage
      page.doLogin(user,password)
  }
  
  Then(~"the user should be logged in"){ -&gt;
      assert at(LoginResultPage)
  }
  </code></pre>
  
  <p>Here is my page definition:</p>
  
  <pre><code>package pages
  
  import geb.Page
  
  class LoginPage extends Page {
  
      static url = "/TSADG_BORGER/loginpin.do"       
      static at = { title == "TastSelv Borger" }
  
         static content = {       
          loginForm { $($/form/$,id:"mainForm") }
          userName { loginForm.find("input",id:"pnr") }
          pass { loginForm.find("input",id:"tastselvKode") }
          buttonLogin { loginForm.find("input",id:"bt1") }
      }
  
      def doLogin(user, password) {
          userName = user
          pass = password
          buttonLogin.click()
      }
  }
  </code></pre>
  
  <p>Here is the HTML for the form:</p>
  
  <pre><code>&lt;form id="mainForm" action="/TSADG_BORGER/loginpin.do" role="form" method="post" autocomplete="off"&gt;
                  &lt;input type="hidden" name="dispatch" value="Valider"&gt;       
                  &lt;div class="row skts-centered-padding"&gt;
                      &lt;div class="col-sm-12"&gt;                         
                          &lt;h1&gt;Log på med TastSelv-kode&lt;/h1&gt;
                      &lt;/div&gt;                                              
                      &lt;div class="col-sm-6"&gt;
                          &lt;div class="skts-process-form-section skts-required  "&gt;
                              &lt;p&gt;&lt;label for="pnr"&gt;Cpr-nummer&lt;/label&gt;&lt;/p&gt;
                              &lt;div&gt;
                                  &lt;input id="pnr" type="text" value="" class="form-control skts-required-val" name="pnr" size="16" maxlength="14" data-validation-event="blur" data-show-type="string" data-show-facets="pattern" data-show-facet-values="/(^\d{10}$)|(^\d{6}\-\d{4}$)/" aria-required="true" aria-invalid="false" aria-describedby="pnrError " autocomplete="off"&gt;                                   
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class="skts-process-form-section skts-required"&gt;
                              &lt;p&gt;&lt;label for="tastselvKode"&gt;TastSelv-kode&lt;/label&gt;&lt;/p&gt;
                              &lt;div&gt;
                                  &lt;input id="tastselvKode" type="password" value="" class="form-control skts-required-val" name="tastselvKode" size="16" maxlength="16" data-show-type="string" data-show-facets="pattern" data-show-facet-values="/^[^]{7,16}$/" data-validation-event="blur" aria-required="true" aria-invalid="false" aria-describedby="tastSelvKodeError " autocomplete="off"&gt;                                                                    
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;br&gt;
                          &lt;p&gt;
                              &lt;input type="submit" id="bt1" class="btn btn-primary skts-validate" value="Fortsæt" autocomplete="off"&gt;
                          &lt;/p&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/form&gt;
  </code></pre>
  
  <p>Any help and input is appreciated.</p>