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

UIAutomation and reading static text in scroll view

I'm doing some UIAutomation testing using Xcode Instruments and have an issue accessing a staticText which I want to verify. The situation: I have some buttons that display different scroll views that contain multiple charts. These scroll views have…
Sae Us
  • 277
  • 1
  • 6
  • 21
0
votes
1 answer

Getting device orientation in UIAutomation

I am writing automation test for my program and wish to automate the device orientation as well... I am using the below code to set an orientation to a device,…
tech_human
  • 6,592
  • 16
  • 65
  • 107
0
votes
2 answers

Monkeytalk : I cannot run javascript

I am trying to automate my IOS app using monekytalk but here is the issue : In Monekytalk we can export mt(monkeytalk script) to JS (java script) and edit it 1stly : i dont get that run tool bar on top when js is focused But when i focus on mt file…
user1664899
  • 327
  • 2
  • 4
  • 15
0
votes
1 answer

How to force instruments not to close app once automation scripts end?

Is there a possible way I can force instruments to let the app keep running when my automation script ends? Use case: I want to run leaks command once the sing-out within the app is done, but let the application be alive after the automation script…
Neeraj
  • 8,408
  • 8
  • 41
  • 69
0
votes
2 answers

How to run multiple .trace files in one run i.e one after the other in UI automation tool?

Iam having five .trace files and now i want to run all the the test cases in one click. How can it be done?
0
votes
1 answer

UI Automation inserting text into textfield containing text

I have been using setValue() for inserting text into text fields, but setValue() replaces any text that is already in the text field. I want to add more text to the existing text in the text field. Is there a way to do so? I am using xcode 4.5, and…
stackErr
  • 4,130
  • 3
  • 24
  • 48
0
votes
1 answer

how to get specific word out of sentence in UIAutomation?

If i need to check whether some specific word is present in some sentence, then what syntax/code i should use in javascript for UIAutomation?
San27
  • 223
  • 2
  • 7
0
votes
0 answers

Automation script to dismiss a playing video

I'm writing an UI Automation script where it needs to dismiss a MPMoviePlayerViewController view. I tried logging it using logElementTree() but only the navigation bar, tool bar, buttons are getting logged. Any pointer??? -MANN
MANN
  • 3,360
  • 1
  • 17
  • 18
0
votes
1 answer

How to screenshot a tapped button using iOS UIAutomation?

I tried the tapAndHold() function from UIAElement var target = UIATarget.localTarget(); target.frontMostApp().mainWindow().buttons()["Button"].tapAndHold() target.captureScreenWithName("shot") but this fails with a JavaScript error: 'undefined' is…
Ortwin Gentz
  • 52,648
  • 24
  • 135
  • 213
0
votes
1 answer

How to Write the Test Suite using UIAutomation?

I'm started looking at UIAutomation for automating our iOS application. Everything seems to be fine, but I need ideas on how to create test suite with UIAutomation ? How can I initialize the application (restart the application) for every test…
nkongara
  • 1,233
  • 8
  • 14
0
votes
1 answer

Not able to write in txt file using performTaskWithPathArgumentsTimeout with python/shell in Instruments

When i try to execute python/shell script(to write in txt file) using performTaskWithPathArgumentsTimeout it doesnt works. I am using it in UIAutomation through Instruments. The result code and error is also '0'. So cant find out exact problem.…
ExploringApple
  • 1,348
  • 2
  • 17
  • 30
0
votes
1 answer

Accessing UIASCRIPT variable in UIAutomation test for iPhone

Is there any way of accessing command line arguments of instruments in javascript test code? I am starting a UI test using the following command: instruments -t …
0
votes
2 answers

What are the differences between these two iOS UI Automation frameworks?

There are two third-party frameworks for dealing with the iOS UI Automation instrument: Alex Volmer's tuneup.js and the Jasmine framework. What are the differences between these two frameworks and what are their advantages and disadvantages?
VJohn
  • 493
  • 1
  • 14
  • 23
0
votes
1 answer

Start and Stop scripts buttons are hidden on instruments

I opened Instruments and select the Automation template for it. After opening an Instrument tool i selected an app from Choose Target. After that i selected my Java Script file from Choose script option but the Start Script and Stop Script option…
Divy
  • 1
  • 1
0
votes
1 answer

UIAutomation API for testing IOS

Where can i download UIAutomation API for testing IOS (on JavaScript)?