Questions tagged [ios-ui-automation]

Automated UI Testing using the Automation instrument included with Instruments for iOS development. Not to be confused with [xcode-ui-testing] which was introduced in Xcode 7.

Instruments is an application shipped with Xcode and used to help profile applications in both iOS and OS X development. One of the tools included with Instruments is the UIAutomation instrument which allows for automated testing of user interfaces using scripts written in JavaScript. This functionality was introduced with the iOS 4 SDK.

This tag specifically focuses on using this functionality in relation to iOS development. These scripts can be used not only to automate a user's interaction with the application, but they can also contain asserts which can test if the application is behaving according to the developer's expectations.

For the new Xcode 7 UI Testing feature, see .

756 questions
0
votes
1 answer

UIACollection view total cell count issue

I am working on UIAutomation for an app and facing some issue while collecting the cells for a collection view on the app. When I do collectionView.cells() in javascript for UIAutomation, I get back only the cells which are visible, but I do have…
tech_human
  • 6,592
  • 16
  • 65
  • 107
0
votes
1 answer

Match two strings in automation testing UI - iOS

I am writing automation test scripts using Automation tool in instruments for my iPad app. In the login screen, when user taps on login button without entering any information, I display an error message. This error message is displayed on a label…
0
votes
3 answers

change iphone language so app launches in respective locale?

is there a way to change the iphone International language in an automated way so that when we launch the app it shows up localized for the target locale (ll-CC)? Thanks a bunch for your help!
ioWint
  • 1,609
  • 3
  • 16
  • 34
0
votes
1 answer

firstWithPredicate not accepting date

I working on UIAutomation for an app, and have a cells on a table view which has data and time as two separate elements. Below is the code I am using to get a cell matching the date or time passed as predicate string. var cell =…
tech_human
  • 6,592
  • 16
  • 65
  • 107
0
votes
1 answer

save logs in UIAutomation Tests in text file

I want to save logs created in text file. When we run any script for Automation, .plist is created in specified folder of Logging tab in instruments. How can I make this conversion or is there any other way to save log messages? Any help on this…
0
votes
1 answer

Search a text/element in UIAElementArray

I am dealing with UIAElementArray for the ios automation and looking for an easier way to search inside the UIAElementArray. Below is the code: var textArray = this.myCollectionViews.staticTexts(); textArray.toArray() // Trying to convert…
tech_human
  • 6,592
  • 16
  • 65
  • 107
0
votes
1 answer

tuneup.js reports "Can't find variable" for test() method

enter code hereBecause I can't get pass/fail logging to work correctly with the 4.6 version of Instruments, I'm trying to use the tuneup.js library, but I keep getting the following error whenever I try to run the test: Can't find variable:…
Wulf
  • 379
  • 1
  • 6
  • 16
0
votes
1 answer

Using the javascript generated by MonkeyTalk with EAGLView

I have the following monkeytalk file as a proof of concept, which taps the correct screen regions: EAGLView * Drag 40 60 40 60 EAGLView * Drag 269 274 36 68 this runs fine and when I try to export it to a javascript file I get the…
0
votes
2 answers

How to Stop the automation testing in ios

Is there any possible way to stop the automation testing? Actually i m testing my app with automation javascript. I have two test in my script. if the first test fail i dont want to continue my script.. MY code: var target =…
0
votes
2 answers

Activate the Breakpoints in UI Automation Instrument for iOS

Is there a way of activating the Breakpoints in Xcode Instruments Automation after writing several scripts because it would seem that there are there but just inactive. I was wondering if I could debug my JS code from the Automation instruments…
0
votes
1 answer

Testing Bool property in app using UIAutomation

I have a property in app of type boolean as in: @property (nonatomic, readwrite) BOOL isPresent; If 'isPresent' is true, then my app displays a notification label on the top of the screen and if it is false, the label sets hidden. I can test the…
tech_human
  • 6,592
  • 16
  • 65
  • 107
0
votes
1 answer

How to get the next cell in a TableView of UIAutomation

In UIAutomation is there something similar to sibling in DOM - https://developer.mozilla.org/en-US/docs/DOM/Node.nextSibling or next in jQuery - http://docs.jquery.com/Traversing/next After I get a cell, I want the cell immediately before or after…
satyajit
  • 1,470
  • 3
  • 22
  • 43
0
votes
1 answer

Instruments doesn't continue after running from command line

When I run Instruments from the command line using this script instruments -w -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate…
0
votes
1 answer

Accessing label text using accessibility identifiers

I have added an accessibility identifier to a label so that I can use it in my UIAutomation javascript files. How do I access the text on the label using accessibility identifier? Suppose "aLabel" is the accessibility identifier and my javascript…
tech_human
  • 6,592
  • 16
  • 65
  • 107
0
votes
1 answer

how to convert string into integer in uiautomation?

I am extracting a value from a text field (using .value()) and then I want to add a number to it so that I can check another value with result of above combination. At present, when I am adding number to it, so its getting appended to it. For eg, if…
San27
  • 223
  • 2
  • 7