title: iOS Instruments Automation "setValue" not working
body: <p>I just want to test my iOS UI with UI Automation but I got stuck when it comes to enter text into UITextFields. The documentation says that the method "setValue(...)" should do the trick but it doesn't.</p>
  
  <p>I always get this error:</p>
  
  <pre><code>Script threw an uncaught JavaScript error: Unexpected error in -[UIATextField_0x9952690 setValue:], /SourceCache/UIAutomation_Sim/UIAutomation-271/Framework/UIAElement.m line 1142, kAXErrorSuccess on line 15 of login.js, #0 setValue() 
  </code></pre>
  
  <p>The code looks like this:</p>
  
  <pre><code>var textfields = UIATarget.localTarget().frontMostApp().mainWindow().textFields();
  username = textfields["username"];
  username.setValue("test");
  </code></pre>
  
  <p>The username field is not null or undefined. </p>
  
  <p>My second solution was this JS project:
  <a href="https://github.com/alexvollmer/tuneup_js#readme" rel="noreferrer">https://github.com/alexvollmer/tuneup_js#readme</a>
  It has a "typeString" method for text fields but it is a little bit buggy and fails when it comes to enter numbers and capital letters. </p>
  
  <p>I'm working with iOS6.1, 
  Instruments Version 4.6 (46000),
  Xcode Version 4.6 (4H127).</p>
  
  <p>Any help is appreciated!</p>