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
4
votes
3 answers

Instruments 4.5 and ios simulator 6.0. not started

In IOS Simulator 5.1 this code worked: `instruments -t /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate…
KOHCTAHTNH
  • 53
  • 1
  • 7
4
votes
3 answers

Automation testing with instruments on device

I am trying to follow this post to run UIAutomation scripts on iOS devices from command line, but i can't make it work. This is the command i am currently using : instruments -t…
LiohAu
  • 611
  • 12
  • 36
4
votes
2 answers

Select a date in UIDatePicker by UIAutomation?

I found that I can't do this by UIAPickerWheel.selectValue(), any idea?
CarmeloS
  • 7,868
  • 8
  • 56
  • 103
4
votes
2 answers

Instruments .trace file issues

When I am checking out the test-scripts from SVN(files committed by my friend), I don't know why the scripts are not editable, play script and stop script options are disabled and Recording is not happening at all. When I am creating a new…
Akshay
  • 2,973
  • 6
  • 43
  • 75
4
votes
3 answers

target.frontMostApp().keyboard() failed to locate key 'N'

I'm trying to automate keyboard typing with UI Automation. target.frontMostApp().keyboard().typeString("INTERCOM") But i will get this error after first 'I' is typed target.frontMostApp().keyboard() failed to locate key 'N' Script threw an…
bollhav
  • 543
  • 6
  • 11
3
votes
2 answers

UI Automation - how to capture - record using javascript editor

MobileSafari.app doesn't have accessibility labels is there a way to capture (record) events so that i can use in the javascript for UI Automation? there was a previous post which made that statement but didn't provide any instructions as to how to…
mimi
  • 31
  • 2
3
votes
2 answers

UIAScrollView's scrollToElementWithName() not working

I am trying my first hand on UIAutomation. I had a scrollview inside which I had more sub-scrollviews. I am able to tap first 6 visible sub-scrollview but later when I try to tap on 7th it says "tap point is not within bounds of screen". So I tried…
Sayali
  • 593
  • 3
  • 9
  • 22
3
votes
1 answer

iOS - UI Automation get textfield by accessibility label?

So in my nib file i enabled accessibility and set the accessibility label of a textfield to "txt" I am trying to find this textfiled based on accessibility name and change its text. var target = UIATarget.localTarget(); var application =…
aryaxt
  • 76,198
  • 92
  • 293
  • 442
3
votes
1 answer

What is the syntax to delete a cell using the UI Automation instrument?

I am working on a UI Automation script to test a page in my application that contains many cells. I have an option to edit and save the page. On clicking "edit" an option will appear to delete a cell. I would like to make my script delete or add…
3
votes
3 answers

iOS UIAutomation UIAActivityIndicator

I've got an activity indicator on my root table view while things get loaded. I'm trying to test for the presence of the indicator, but can't seem to get ahold of the UIAActivityIndicator, nor can I find it anywhere in the app element tree…
EdG
  • 31
  • 3
3
votes
2 answers

UIATableView Always Named "Empty list"

I'm trying to set up some UIAutomation tests on the iPhone. Whenever I execute logElementTree() on the main window, all of my UIATableView elements have the name "Empty list." I have tried setting the name in the corresponding XIB file, but once…
DuneBug
  • 1,543
  • 4
  • 15
  • 28
3
votes
1 answer

UI iOS Automation: I want to background the app and click the settings panel to put the phone into airplane mode to test the apps offline behaviour

I'm trying to automate setting the iOS into airplane mode, but I don't know how to access the settings panel to do so. I have tried the following to be able to see if the settings panel is listed when the app is in the background so as to be able to…
3
votes
2 answers

how to give custom test files path for detox e2e testing

We are using Detox framework for IOS e2e testing. Detox by default created e2e folder and run all test files created under it. Is there any way I can create the test files on some other folder and configure that path and run it?
Alok
  • 184
  • 2
  • 18
3
votes
1 answer

There is a way to do a "long" Swipe Left gesture to delete an element in XCUITest

I'm trying to delete an element doing swipe left over it. This option exist in two ways in my application. Do short swipe left and the delete button appears, then you can press it. No problem here. Do long swipe left and the element will be…
3
votes
1 answer

Issue facing for xcode-ui-testing in XCode 9

UI Test for an ios-app, developed in XCode 8 and swift 3.2. Facing problem to deal with ScrollViews, collectionViews after upgrade XCode to 9 I can tap and access the Buttons, StaticTexts, TextFields elements. But I can not tap or access the…
Ali Azam
  • 2,047
  • 1
  • 16
  • 25