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
229
votes
8 answers

iOS Tests/Specs TDD/BDD and Integration & Acceptance Testing

What are the best technologies to use for behavior-driven development on the iPhone? And what are some open source example projects that demonstrate sound use of these technologies? Here are some options I've found: Unit Testing Test::Unit…
ma11hew28
  • 121,420
  • 116
  • 450
  • 651
72
votes
14 answers

Automated testing for iPhone

I know this one is going to be a long-shot, but I thought I'd try. Does anyone know of any automated test anything for the iPhone simulator? I'd love it if there was something like Selenium but for the iPhone simulator. I don't need anything…
sammich
  • 335
  • 5
  • 13
  • 19
61
votes
3 answers

Instruments automation trace only allows one target connection?

I've created a simple javascript for my iOS app that I'd like to run simultaneously on multiple iOSDevices connected via USB to one host Mac machine. Launching instruments connected to an iPhone from the command line works fine but if I attempt to…
ksig
  • 610
  • 5
  • 6
55
votes
4 answers

What's the difference between setAccessibilityLabel and accessibilityIdentifier in ios?

I've been going through our code base and setting the accessibilityIdentifier property on all of our buttons and text fields so that I can access them using UIAutomation. While doing this, I came across some code that was already in…
Tyler Pfaff
  • 4,900
  • 9
  • 47
  • 62
54
votes
9 answers

Can the UI Automation instrument be run from the command line?

Is there a way to open the UIAutomation instrument through the terminal? Will it be possible to write an AppleScript to open Apple's UIAutomation tool and load the application to be tested? Can you please tell me is there any way through scripting…
Vijay
  • 878
  • 1
  • 7
  • 21
47
votes
1 answer

How to use UIAutomation on a Today extension widget?

I am trying to use UIAutomation for testing an iOS 8 Today extension widget. I can change the target to the extension, launch it, but then unable to do anything after that. Has anyone had any success in using UIAutomation with the extensions?
Rohit Gupta
  • 757
  • 4
  • 7
39
votes
3 answers

How to get Bundle Id of your app iOS UIA automation

How do I get the bundle Id of the app I am in ?
swathy valluri
  • 5,039
  • 2
  • 16
  • 13
30
votes
11 answers

Is there a way to remove the authorization prompt from command-line instances of Instruments (Xcode)?

I am currently using Instruments via a bash script to initiate the command-line interface to start up runs of the Automation plug-in. With 4.2, this worked well enough, however with the upgrade to Xcode 4.3, I am now being prompted for an…
Darc
  • 696
  • 1
  • 6
  • 14
27
votes
5 answers

can I set accessibility identifier in interface builder? Xcode4.2

I can only set Accessibility Label in interface builder, but in UI Automation,I need Accessibility Identifier to get the UI elements. any way to do this?
CarmeloS
  • 7,868
  • 8
  • 56
  • 103
25
votes
5 answers

Launch a specific Hardware version of iOS simulator using instruments command line utility

I am using UIAutomation provided by Apple -> Xcode -> instruments. I have my Javascripts and the whole automation using instruments command line infrastructure running up. I got an additional task of running automation on previous versions of…
22
votes
1 answer

What does com.apple.CoreSimulator.CoreSimulatorService do?

Our iOS automation tests on simulator have gone through disaster since upgrading to Xcode6. We can observe view switching slowing down, UIAutomation felt it too and often returned an empty or not fully updated app main window, you can imagine the…
Sugre
  • 851
  • 2
  • 9
  • 19
19
votes
1 answer

iOS UIAutomation Simulator 5.0: The target application appears to have died

I'm trying to use the record feature in UIAutomation that only works on Simulator 5.0. When using UIAutomation on Simulator 4.3, it runs perfect. When running my app from Xcode on Simulator 5.0 it runs perfect. This rules out the possibility that…
Or Arbel
  • 2,965
  • 2
  • 30
  • 40
16
votes
1 answer

Best Resources for UIAutomation Testing for iOS Applications

Testing with UIAutomation on Instruments is great, however, the documentation and resources around it are either non-existent or in hiding. What are the best resources (documentation, blog posts, Stack Overflow questions) that have helped you in…
dtuckernet
  • 7,817
  • 5
  • 39
  • 54
15
votes
7 answers

How to click home button in iOS simulator?

I want to click home button in iOS Simulator by automation. I just want to know whether it is possible to do click home button using IOS keycode event.
selvi
  • 1,271
  • 2
  • 21
  • 41
14
votes
4 answers

Why am I seeing "An error occurred while trying to run the script." in the UI Automation instrument?

When I try to run a UI Automation script on iOS 5 devices I am getting the following error: "An error occurred while trying to run the script." The same script is running perfectly in the simulator or on an iOS 4.3.3 device. How can I solve this…
Abhijeet
  • 503
  • 5
  • 11
1
2 3
50 51