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

Recording User Actions using Instruments

I've tried looking for a while, but is there a way to record user actions on iphones/iphone simulators for testing with Instruments? Mainly I want to be able to target an app and record whatever user input I enter, then have that be able to play…
lipd
  • 47
  • 2
  • 6
4
votes
0 answers

Appium session does not exist error after upgrade to latest version

So i have MAC and real iPhone device connected (IOS 12.2). From another computer I start the driver and perform my stuff. Today after upgrade appium version I got this error: selenium.common.exceptions.InvalidSessionIdException: Message:…
falukky
  • 1,099
  • 2
  • 14
  • 34
4
votes
2 answers

uiautomation - Tapping custom view doesn't work

I am trying to automate some tests of my ipad application. I have a scrollview which contains a custom view. The custom view overwrites the drawRect and has a TapRecognizer. The custom view is created into the code and I have set this…
Fab
  • 1,468
  • 1
  • 16
  • 37
4
votes
0 answers

UITest cannot find element when contained in Modal View Controller

I have an application that has the following structure: A root UIViewController (A). Inside it is a UINavigationController (B) that pushes and pops different UIViewControllers (C). Sometimes, the UIViewControllers (C) inside the…
Danny Bravo
  • 4,534
  • 1
  • 25
  • 43
4
votes
2 answers

UI Automation :- How to click button using javascript of a screen which is not the main screen (iPhone)?

want to click a button through javascript for testing purpose. i am able to click the button which is on first page, but dont have idea how to click button on second page which comes after clicking button on first page.
Prachur
  • 1,100
  • 7
  • 24
  • 42
4
votes
1 answer

How can I simulate a swipe gesture programmatically?

I'm currently trying to write some acceptance tests for our new iOS application using frank (and in turn UISpec). Whilst the framework supports touches as a basic way to interact with views, it doesn't currently support any more involved gestures…
jkp
  • 78,960
  • 28
  • 103
  • 104
4
votes
2 answers

Xcode 9 - Xcodebuild error - UI tests not running, Timed out waiting for AX loaded notification

My tests do not start executing, and always timeout every time I try to use an xcodebuild command. The command that I used is the following: xcodebuild -workspace App.xcworkspace -scheme 'AppName' -sdk iphonesimulator -configuration 'UI_Automation'…
John Smith
  • 353
  • 1
  • 4
  • 9
4
votes
0 answers

How to send matching fingerprint in iOS XCTest

I am using xcode 8, swift, and creating a XCTest. I need to login to the application using a 'fingerprint' via the simulator. How can I send the option via an XCTest to the XCUIApplication that is normally chosen via the Hardware menu?: When the…
reutsey
  • 1,743
  • 1
  • 17
  • 36
4
votes
1 answer

How to get UIAutomation, Simulator, and Xcode Debugger Running at the same time?

Can anyone point me to the documentation on how to make Instruments run UIAutomation scripts and start the iPhone application with the debugger running in the Simulator? Constraints: I only have iPhone 3g hardware to test with and debugging against…
Neil
  • 601
  • 7
  • 16
4
votes
2 answers

Using UIAutomation to search elements on the Main View is really slow in IPhone app

When I use for loop, which calls UIATarget.localTarget().frontMostApp().mainWindow().elements(); to search a specific element on the Main View, it runs really slow. Has anyone experienced this problem yet? If so, any sug
Weiming Chen
  • 41
  • 1
  • 3
4
votes
4 answers

XCTest How to tap on Url (Link) inside UITextview?

I have added accessibilityIdentifier to the source code. And did: let privacypolicyurl = app.tables.textViews["privacyPolicy"] privacypolicyurl.tap() And another way: let privacypolicyurl = …
4
votes
3 answers

Why can't I access the Back button in my iPhone application using a UI Automation script?

I have a simple function that should check if the view is at the home interface, and if not, bring it to the home: function returnHome() { if (UIATarget.localTarget().frontMostApp().navigationBar().name() == mainTitle) return true; // set…
Mustafa
  • 20,504
  • 42
  • 146
  • 209
4
votes
2 answers

Does UIAutomation framework works on the simulator?

I am new to iPhone Automation, and UIAutomation framework introduced by iOS4. Recently I am using UIAutomation to automate testing app on iPhone Simulator via instruments but it gives me an error like "Unexpected error in -[UIATarget_0x5a20d20…
Gopal Dube
  • 41
  • 2
4
votes
1 answer

How can I get captureScreenWithName in UIAutomation working in iPhone Simulator?

I am new to iPhone Automation, and also UIAutomation introduced by iOS4. Recently I am using UIAutomation to automate testing app on iPhone Simulator, everything goes well, until I need to take screenshots using captureScreenWithName provided by…
user414827
  • 41
  • 2
4
votes
5 answers

UI Automation Error: UI TESTING FAILURE-APP failed to quiesce within 30.0s

Since xCode updated i'm having trouble running any ui test case. It gives me this error when its expected to do a simple tapping action for example: XCUIApplication *app = [[XCUIApplication alloc] init]; XCUIElement *passwordSecureTextField =…
CodeGeass
  • 619
  • 2
  • 7
  • 20