ios-ui-automation

UIACollectionView cells vs visibleCells

 ̄綄美尐妖づ 提交于 2019-12-06 03:04:34
问题 I'm trying to write a test script using automation in xcode 4.5. I have a UICollectionView and I want to click on some cell not currently visible. Per documentation, I should expect cells to return all cells in the collection view, and visibleCells to return only the currently visible ones. Instead what I'm seeing is that cells returns only the currently visible cells, and calling visibleCells stops the script on 'undefined' is not a function (evaluating 'collection.visibleCells()') var

How to fetch file content (basically read) a local file in javascript for UIAutomation iOS

老子叫甜甜 提交于 2019-12-06 02:01:35
Is there a possible way to read a local file in JavaScript. MyFolder: db.csv Parse.js Trying to fetch the contents of file db.csv in Parse.js, But in vain. Can you share some links where I can get enough knowledge how to read a file. Running Instruments in Xcode5, with test scripts in .js file where I have to feed in some values from a .csv file. coder284 iOS UIAutomation, apple provides an api for running a task on the target's host. performTaskWithPathArgumentsTimeout Using this, we can have a bash script to printout the contents of a file that we wanted to fetch in the first case. Bash

UI Automation - how to capture - record using javascript editor

拟墨画扇 提交于 2019-12-06 00:16:07
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 record using the javascript editor details please thank you in advance! Just open a new script in your Instrument session, and push the little record button at bottom of the page (appears on the screenshot). Now use your app and you should get that kind of stuff: Now you can see the value or the name of your buttons and use it to write your own

UIAutomation through command line on a real device

谁都会走 提交于 2019-12-05 23:20:46
问题 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

What does com.apple.CoreSimulator.CoreSimulatorService do?

血红的双手。 提交于 2019-12-05 14:25:10
问题 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

UIAutomation Nested Accessibilty Elements Disappear from Hierarchy

99封情书 提交于 2019-12-05 13:55:42
问题 I have a view with two subviews a button and an Image, I turn on accessibility and set the label on the subviews and I can see the hierarchy by calling UIATarget.localTarget().frontMostApp().mainWindow().logElementTree(); I get the following for example: 1 Window 2 My View 3 My Button 3 My Image If I then turn on accessibility and set the label for my parent view I can no longer see my button and image anywhere in the hierarchy. I just get: 1 Window 2 My View Why have my views disappeared?

UIAutomation test invocation from the command line with Xcode 6

隐身守侯 提交于 2019-12-05 12:25:45
Running UIAutomation tests from the command line seems to break often with new Xcode releases (judging by past posts). Having never used the command line scripting for this, I found this post from 2012: Automation Instrument from the Command Line . The Problem: My command returns without error, without output results and without anything logged to the system console. The simulator does not even launch! Checking some of the paths for updates (notably, the Automation trace instrument path), I came up with this command. Note the path in the first parameter (it's different than in past Xcode

UIAutomation : Change location when the app is in background

≡放荡痞女 提交于 2019-12-05 04:30:56
I am working on UIAutomation. I need to change the location when the app is in background. I have tried following line of code: var target = UIATarget.localTarget(); UIATarget.localTarget().deactivateAppForDuration(30); target.setLocation({longitude:77.50, latitude:12.50}); but target.setLocation is not getting called until the app comes to foreground. Could any one please tell me how I can change the location when the app is in background. Unfortunately UIAutomation can only automate the application it's attached to. When the application is not "active", it has nothing to talk to. Using

Automation of Settings app, iPhone

99封情书 提交于 2019-12-05 02:36:41
问题 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? 回答1: I know I'm late to the party, but I'd like to provide a more complete

UI Automation Testing: How do I select UIAPickerWheel values?

柔情痞子 提交于 2019-12-04 19:32:57
I've hit a roadblock in trying to write some automated tests for my iPhone app. Judging from the documentation I feel like this should select the first row of the first component of my UIPickerView: var picker = UIATarget.localTarget().frontMostApp().mainWindow().pickers()[0]; var aWheel = picker.wheels()[0]; var someVals = aWheel.values(); aWheel.selectValue(someVals[0]); But instead I get the following error, logged in Instruments: Exception raised while running script: - selectValue requires a valid value Any ideas how I can Set predictable values on my UIPickerView cells/components?