Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6761359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:10:44+00:00 2026-05-26T14:10:44+00:00

I am trying to automate iPHone UI testing throught JavaScript. I am in a

  • 0

I am trying to automate iPHone UI testing throught JavaScript.

I am in a compose mail page and I need to enter email-id in the TO,CC & 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.

I used the following code

var app = UIATarget.localTarget().frontMostApp(); 
app.keyboard().elements()["go"].tap();

But did no good for me 🙁

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

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.

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

var app = UIATarget.localTarget().frontMostApp();
app.segmentedControls()[0].buttons()["Body"].tap();

Please help me with this.

Thanks in Advance
Kiran

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:10:45+00:00Added an answer on May 26, 2026 at 2:10 pm

    I think you could do this a little better and with some reusability. Try defining a method like this:

    function typeCharacters(inputString) {
        for(var i in inputString) {
            target.frontMostApp().keyboard().typeString(inputString[i]);
        }
        target.frontMostApp().keyboard().typeString("\n");
    }
    

    A quick test of this might look like this:

    var timestamp = new Date().toString();
    typeCharacters(timestamp);
    

    Then you sit back and enjoy watching the keyboard type out a nice date for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to automate functional testing of a server using a realistic frequency
I am trying to automate the process of scanning/cropping photos in Photoshop. I need
I'm trying to automate a web process where I need to click a button
I am trying to automate my testing procedure using Ant. This is my error:
I'm trying to automate testing of the code... well, written without testing in mind
Im trying to automate our build process. To do this i need to compile
While trying to automate testing with selenium rc I ran into this problem. I
I am trying to automate testing of a winform application. I am running it
I am trying to automate the creation of a smart mailbox in Apple Mail
I am trying to automate testing an application written in C++. I use UI

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.