title: Cannot set Input text field using AnglurJS and Geb
body: <p>I am using Grails and AngularJS in a webapp. To test, I am trying to use Geb (a groovy wrapper around selenium / webdriver).</p>
  
  <p>I am having difficult setting an input text field.</p>
  
  <p>Here is my pageclass.</p>
  
  <pre><code>class CartReviewPage extends Page {
      static url = "albert/tony"
  
      static content = {
          userNameField{$("input.yy-login-input.red-login-input")}
          ...
      }
  
      static at = {
          userNameField != null
          ...
      }
  
      void enterUsername() {
          userNameField.value("me@mail.com")
      }
  </code></pre>
  
  <p>}</p>
  
  <p>Now, when my test is on this page, and invoked enterUserName(), I get:
      org.openqa.selenium.ElementNotVisibleException: Element is not currently visible and so may not be interacted with</p>
  
  <p>Now, I debug the code.  When it enters <code>enterUserName()</code>, the <code>userNameField</code> variable in Eclipse debugger is:</p>
  
  <pre><code>userNameField - SimplePageContent (owner: CartReviewPage, args: [], value: )
  </code></pre>
  
  <p>Using firebug, the HTML of my input text box is:</p>
  
  <pre><code>&lt;input id="timeout-d75b39e8-cb1d-451e-8850-4337e7fd191f-d-login-username" class="yy-login-input red-login-input" type="text" placeholder="User" autocorrect="off" autocapitalize="off"&gt;
  </code></pre>
  
  <p>I am beginning to think Angular has done some magic to stop me updating the value of the field.  But I am really at a loss here.  Any ideas or tips?</p>
  
  <p>I am using Firefox driver:</p>
  
  <pre><code>def driver = new FirefoxDriver();
  </code></pre>
  
  <p>I can see a firefox open when the test runs, so all ok there.</p>
  
  <p>Here is full stack trace:</p>
  
  <pre><code>Build info: version: '2.31.0', revision: '1bd294d185a80fa4206dfeab80ba773c04ac33c0', time: '2013-02-27 13:51:26'
  System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8.3', java.version: '1.6.0_51'
  Session ID: 5acf64d6-8cd6-d146-bb9f-aea1db5c9c42
  Driver info: org.openqa.selenium.firefox.FirefoxDriver
  Capabilities [{platform=MAC, acceptSslCerts=true, javascriptEnabled=true, browserName=firefox, rotatable=false, locationContextEnabled=true, version=23.0.1, cssSelectorsEnabled=true, databaseEnabled=true, handlesAlerts=true, browserConnectionEnabled=true, nativeEvents=false, webStorageEnabled=true, applicationCacheEnabled=true, takesScreenshot=true}]
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:187)
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
      at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:268)
      at org.openqa.selenium.remote.RemoteWebElement.clear(RemoteWebElement.java:113)
      at geb.navigator.NonEmptyNavigator.setInputValue(NonEmptyNavigator.groovy:562)
      at geb.navigator.NonEmptyNavigator.setInputValues_closure34(NonEmptyNavigator.groovy:540)
      at geb.navigator.NonEmptyNavigator.setInputValues(NonEmptyNavigator.groovy:539)
      at geb.navigator.NonEmptyNavigator.value(NonEmptyNavigator.groovy:328)
      at geb.content.NavigableSupport.methodMissing(NavigableSupport.groovy:123)
      at com.me.CartReviewPage.enterUsername(CartReviewPage.groovy:23)
      at com.me.geb.spec.ViewProductGebSpec.viewing a product(ViewProductGebSpec.groovy:26)
  </code></pre>
  
  <p>Thanks!</p>