Need help automate iPhone keyboard input throught javascript
<p>I am trying to automate iPHone UI testing throught JavaScript.</p>

<p>I am in a compose mail page and I need to enter email-id in the TO,CC &amp; BCC fields. I have the focus in TO field and keyboard is displayed. To field is UIATextField, however the usual way of entering data into textfield is not entering the data.</p>

<p>I used the following code</p>

<pre><code>var app = UIATarget.localTarget().frontMostApp(); 
app.keyboard().elements()["go"].tap();
</code></pre>

<p>But did no good for me :(</p>

<p>I want to input the email address(abc@xyz.com) through the displayed keyboard.</p>

<p>Please help me with a code snippet. Also please let me know  how to change the focus from "TO" field to "CC" which are one below the other.</p>

<p>The <code>Header</code>, <code>Body</code> buttons on the page are a <code>segmentedControls</code>. I am not able to tap them using the code snippet.</p>

<pre><code>var app = UIATarget.localTarget().frontMostApp();
app.segmentedControls()[0].buttons()["Body"].tap();
</code></pre>

<p>Please help me with this.</p>

<p>Thanks in Advance
Kiran</p>
