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

  • Home
  • SEARCH
  • 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 9199601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:34:14+00:00 2026-06-17T22:34:14+00:00

I am trying how to identify a cell in a table view, using name

  • 0

I am trying how to identify a cell in a table view, using name using UIAutomation framework. This is a screenshot from editor view of instruments.

enter image description here

I tried the following approaches but didn’t succeed yet. What’s is the correct or good approach. In general does withName work with any UIAElement?

  1. mainWindow().withName(“11:00 AM”)
  2. target.frontMostApp().mainWindow().tableViews()[0].cells()1.tableViews()[0].cells()[“11:00 am”]

Note that identifying the element with hard coded position works. Like below

target.frontMostApp().mainWindow().tableViews()[0].cells().tableViews()[0].cells()[2]

withName is mentioned in apple documentation – http://developer.apple.com/library/ios/#documentation/ToolsLanguages/Reference/UIAElementClassReference/UIAElement/UIAElement.html#//apple_ref/javascript/cl/UIAElement#withName

  • 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-06-17T22:34:15+00:00Added an answer on June 17, 2026 at 10:34 pm

    For clarification, the withName() method on UIAElement is a test to see if the element has that name or not. It returns the element if so, or returns a UIAElementNil if not.

    What you’re thinking of is withName() on UIAElementArray, which filters the result of the element array to only those with the given name.

    You called withName() on the window, which won’t work. These query methods do not do a deep traversal of the element tree to find things. You need to do the traversing yourself like you’re doing in line 2.

    I’m not quite sure why it’s broken, though. It looks like you’re traversing correctly. My hunch is that the name may be hiding extra whitespace characters or unicode in it that the simple string “11:00 am” doesn’t match.

    I have a couple suggestions to track this down. Create an intermediate variable for your inner table view. It’ll be easier for me to type these suggestions.

    var innerTableView = target.frontMostApp().mainWindow().tableViews()[0].cells().tableViews()[0];
    

    Now try these two suggestions and let me know what it says:

    1. Log the full text of the name of the second cell to see what it is: UIALogger.logMessage("Name is '" + innerTableView.cells()[2].name() + "'");
    2. And if that doesn’t help you figure it out, then try matching with a predicate: innerTableView.cells().firstWithPredicate("name contains '11:00 am'").logElement();

    What happens when you run either of those suggestions?

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

Sidebar

Related Questions

I am trying to identify duplicate serial numbers from the following xml using XPath
I just started using ReSharper and I'm trying to identify why it thinks this
I'm trying to identify if this is an IIS issue or a code issue.
Using Delphi XE 2 I've trying to identify the zoom direction to apply the
Im trying to identify an attribute using SAX. My XML is as follows <DAY
I'm trying to learn iOS development and I cant figure this out! EXAMPLE: Using
I am trying to identify this bug. Is this a known issue already or
I am trying to identify private apis of Quartz framework. I have a list
I am trying to identify the reason of deadlock using SQL Server Profiler. Here's
I'm trying to identify the Navigation Bar in the current view so that I

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.