ios-ui-automation

How to continue testing an iOS app, using UIAutomation instrument, even after the app exits?

天大地大妈咪最大 提交于 2019-12-04 04:42:04
I have an app. There is a button in the app, which, if clicked, exits the app. I am testing the app using UIAutomation instruments. I want to test this button. But after the app exits, the instrument stops giving an exception. What I want to do is that after the app exists, I want to reopen the app and continue with the rest of the test. Have anyone else been in the same scenario? If so, can you please share the solution, if you have found any? This is not possible because Instruments loses the connection with the app process once it quits. If you are scripting UI Automation from the command

UIAutomation through command line on a real device

ε祈祈猫儿з 提交于 2019-12-04 04:01:32
I know starting from Xcode 4.2 it is possible to run UIAutomation scripts through command line. I've tried this and is working perfectly fine for me in simulator. I'd like to know how to get this run in an actual device.I searched and got the command for running on device as, instruments -w <device_id> -t /Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate application -e UIASCRIPT script -e UIARESULTSPATH <results path> What exactly should I give in the application , is it the path to ipa or

Instruments Automation Tool: Script Ended Without Explicitly Closing This Test

試著忘記壹切 提交于 2019-12-04 02:11:48
问题 I was playing around with the Automation tool in Instruments today but have had problems writing a working test. The following example will exit with Issue: Script ended without explicting closing this test . Yes, the message really does say expliciting . I assume this is a typo introduced in a recent version of Xcode. This is the first time I've tried using this tool. Setting cellCount to 6 results in a Pass but anything gives me the 'script ended' message. Am I doing it wrong or is there a

What does com.apple.CoreSimulator.CoreSimulatorService do?

夙愿已清 提交于 2019-12-04 01:43:15
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 stability. Part of the reason is that we have slow VMs, but still we need to find ways to workaround it. Then I notice there's the CoreSimulatorService process staying alive between the launches and shutdowns of simulator. So I killed it to see what change would it make: killall -9 com.apple.CoreSimulator.CoreSimulatorService After it was killed and

How to check element properties in iOS gui automation?

情到浓时终转凉″ 提交于 2019-12-03 19:38:18
问题 All UI Automation examples I've seen uses standard components whose state can be inspected with the JavaScript API using the value() method. This is a bit limiting. Lets say you want to check the color or alpha value and whatnot. How can I inspect the properties of a view? An example: a tap on a certain element should make it "selected". I'd like to perform a tap on it and then verify that isSelected is TRUE. Update: I found the withPredicate() method which should do it in theory, except it

Automation of Settings app, iPhone

风格不统一 提交于 2019-12-03 17:34:09
I am trying UI Automation on iPhone for connecting to any given Wi-Fi network. I want to automate Settings app. It should automatically: open Settings app; turn on Wi-Fi; connect to given network by providing SSID and WPA . My questions are: Is it possible to automate any inbuilt app using UI Automation? Does the Apple/iOS security model preclude any such access to inbuilt apps? If it is possible, how to achieve this? I know I'm late to the party, but I'd like to provide a more complete answer and elaborate on my solution. I run my uiautomation from shell scripts, here's my solution.. (You'll

How about UI automation testing for iOS app with instruments & Javascripts [closed]

时光总嘲笑我的痴心妄想 提交于 2019-12-03 17:33:20
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . Get knowing the automation UI testing for iOS apps from WWDC2010 video session, but no practices for it. From codeproject project,we can have one example. Questions here to hear from people who have involved this. Any limitations ? Any good practices ? 回答1: I recommend to start

When recording using UIAutomation on a device, it hangs on 'Starting Capture…' . Works fine on Simulator

ε祈祈猫儿з 提交于 2019-12-03 17:04:24
Has anyone else had this problem? I'm new to UIAutomation. Am using Xcode4.5, trying to record commands on my iPad 3 running ios6. When I click the record button, it just hangs on 'Starting Capture...'. I had this problem initially when trying to run on the simulator and was able to solve it using. sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer. Can't seem to get it working on my device. Do the accessibility settings need to be set a certain way? I have multi-tasking turned on. When I try to run a script, nothing happens. No errors or anything. Totally stumped. Make sure

iOS UI Automation element finds no sub-elements

江枫思渺然 提交于 2019-12-03 13:48:59
问题 I'm just starting out with UI Automation for my iOS app and am already having trouble. I'm unable to attach screen shots so I'll do my best to describe my scenario. I'm building for iOS 6.0 and am using a storyboard. The app launches to a screen with a navigation controller. The root view controller contains a main view that has 1 UIView subview that takes up the bottom 60% of the screen and a segmented control that sits above that subview. I was able to configure accessibility for the main

UIAutomation with code coverage

女生的网名这么多〃 提交于 2019-12-03 13:21:14
问题 I am currently automating our iOS testing on jenkins. So far I had no problems with running unit tests, converting OCUnit into JUnit and generating code coverage in Cobertura format (lots of googling but no hard problems). However, when creating UIAutomation job, I am stuck. The tests are running successfully (calling instruments from command line). Generating junit report was tricky but possible. The problem is that when running UIAutomation, no code coverage files are generated. Is there a