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
3
votes
1 answer

How to iterate through ui table elements of different types in swift

Using XCUITest, is there a way to iterate through a subset of a table in swift that contains both 'Cells' and 'Other'? I know I could do table.otherElements or table.cells to get access to each of those separately, but is there a way to get all…
reutsey
  • 1,743
  • 1
  • 17
  • 36
3
votes
1 answer

XCTestCase not launching application in setUp class method

I am using XCode 8 and XCTestCase. I created a class setUp function to be ran once before all tests, and the other setUp to be ran before each test case. I want the application to be launched once before all test cases. If I use the launch in the…
reutsey
  • 1,743
  • 1
  • 17
  • 36
3
votes
1 answer

UI Automation, reusing code within another framework or hack to make it work?

I have a lot of UI Automation JavaScript code which is no longer useable since support was dropped in Xcode. I'm looking for any means possible to try an reuse as much of the code as possible. I just wondered if there's is any sort of migration path…
Jules
  • 7,568
  • 14
  • 102
  • 186
3
votes
0 answers

Appium Inspector timing out due to large number of elements for iOS

I am automating an app on iOS with the following configuration: OSX 10.11.6, Appium 1.5.3, Xcode 7.3.1. I can use the Appium Inspector for the majority of the app except for one page once the data is loaded from a server. This page holds 1000s of…
3
votes
2 answers

Can we use UI Automation tools with the iPhone Simulator?

I’ve been using the new UI automation tools with Instruments and the iPhone SDK 4.0, but so far I haven’t been able to get it to run under the iPhone Simulator. I’ve tried setting the target to every location possible—my build folder, the app folder…
Jeff Kelley
  • 19,021
  • 6
  • 70
  • 80
3
votes
1 answer

How do you force the iOS upgrade dialog (and other Apple dialogs) to dismiss before running CI tests?

Every time there's a minor/major OS update available, Apple displays a dialog on our CI iPad (physical device). I believe I have also seen one that is something like "you have not backed up in 2 weeks". Those dialogs block our automation and it…
Teresa Peters
  • 229
  • 3
  • 14
3
votes
0 answers

Analysing CPU/Memory usage while UI Automation

I am automating my iOS app using UIAutomation framework from terminal. Now i want to analyse CPU and Memory usage of application while automation, again using terminal. Does instruments allow using 2 trace templates at a time (Automation and…
Assassin
  • 215
  • 1
  • 4
  • 13
3
votes
1 answer

Appium driver on c# error :Using the generic type Appium.AppiumDriver' requires 1 type arguments

I'm using c# for web automation integrated with soucelab and I would like to use it for mobile web as well. I'm trying to follow some examples from soucelab for appium but is throwing and error once I try to create the AppiumDriver [TestFixture…
3
votes
0 answers

How do I test for the appearance of a notification in the notification shade?

We are testing an iOS application that works the following way: If the user sends the app to the background while performing a task, the app alerts the user to resume the task. Tapping on this notification puts the app back into foreground, and it…
Vish
  • 2,144
  • 5
  • 25
  • 48
3
votes
1 answer

Communicate between UIAutomation and app

Is there any way for a UIAutomation script to communicate with the running app and just send it information, trigger a function, or change a variable - directly rather than through the UI? I ask because I am using just using the script to take…
RyanM
  • 320
  • 2
  • 9
3
votes
1 answer

In XCode Instruments, is there a way to find the iOS version of the Simulator at runtime via Javascript

When executing an automated test case, the object to be selected ("tapped") is different in iOS 7.x vs iOS 8.x, even though the developer didn't change code specifically for the different iOS versions. Instead of executing the step in a try catch…
3
votes
2 answers

WebKit Threading Violation - initial use of WebKit from a secondary thread in UI Automation

When I tried to run my automation scripts through the terminal with Xcode 6 I got this error message: WebKit Threading Violation - initial use of WebKit from a secondary thread. Can someone help me to run the automation scripts through terminal or…
Sugan S
  • 1,782
  • 7
  • 25
  • 47
3
votes
1 answer

How to clear Editor log and Trace Log when using Automation Instrument

I am using Automation Instrument to test out my iOS app. I was wondering how can I delete my old log messages from the Editor log and Trace Log? The only way I know is to close my Profile window, open a new one and load in my JavaScript files in…
SimpleApp
  • 506
  • 4
  • 17
3
votes
1 answer

Looking for tutorial about automation real iOS devices with Appium

There is some useful tutorial which you could advice? I learned how write and run test with Emulator but can't understand how to run on real iOS devices (what I provide in the code, how properly Appium server should be run, etc.).
Kirill
  • 1,530
  • 5
  • 24
  • 48
3
votes
1 answer

Xcode Automated UI testing log memory usage

Is there a way with the JavaScript framework that Apple gives the developer to log memory usage. I know you can add Instruments to look at the memory usage but I want to be able to log memory usage in the Trace Log after certain actions.
Jeremy
  • 364
  • 3
  • 18