problem about ios-ui-automation-Collection of common programming errors
nschum
iphone ios4 sdk ios-ui-automation
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 frontMostApp], /SourceCache/UIAutomation_Sim/UIAutomation-37/Framework/UIATargetElements.m line 437″I have also tried it by running app on the iPhone 3G device after updating it with iOS4. But the instrument shows me the warning “Automation is not supporte
dtuckernet
iphone ios ios-simulator ui-automation ios-ui-automation
I’ve been using the new UI automation tools with Instruments and the iPhone SDK 4.0, but so far I haven’t been able to get it to run under the iPhone Simulator. I’ve tried setting the target to every location possible-my build folder, the app folder in ~/Library/Application Support/iPhone Simulator, etc.-but I get an error message when I try to run it:Unexpected error in -[UIATarget_0x5a1e3b0 frontMostApp], /SourceCache/UIAutomation_Sim/UIAutomation-37/Framework/UIATargetElements.m line 437,Has
nschum
iphone ios4 instruments ios-ui-automation
I am currently using IOS SDK 4.0.2 and learning how to do UIAutomation. Unfortunately I found that in the Simulator, when I try running a simple Java script test (that just assigns variables) I get the following error.Unexpected error in -[UIATarget_0x5d04f60 frontMostApp], /SourceCache/UIAutomation_Sim/UIAutomation-37/Framework/UIATargetElements.m line 437,Here is the “Script” I was trying to runfunction iDontDoAnything() {var target = UIATarget.localTarget();var app = target.frontMostApp();var
nschum
ios accessibility ios-ui-automation
I can only set Accessibility Label in interface builder, but in UI Automation,I need Accessibility Identifier to get the UI elements. any way to do this?
tech_learning
objective-c xcode4.5 ios-ui-automation
I have a xib file which has a view. Under a view, I have few labels… I am working on UIAutomation and hence want to add accessibility identifiers to the view and each of these labels. How can I do it inside the xib? I googled and found that a field named “identifier” should be used… but I cannot see any suck field for view and label.Please suggest.
tech_learning
objective-c arrays ios6 ios-ui-automation
I am dealing with UIAElementArray for the ios automation and looking for an easier way to search inside the UIAElementArray.Below is the code:var textArray = this.myCollectionViews.staticTexts();textArray.toArray() // Trying to convert UIAElementArray to a javascript array.logger.logDebug(‘Array object is’ + textArray); // Here the output is [object UIAElementArray]; which I guess should be Array and not UIAElementArray.if (textArray.indexOf(‘Hello’) > -1) {// do this }Here I am getting a cr
Brad Larson
ios instruments ios-ui-automation xcode-instruments
When I try to run a UI Automation script on iOS 5 devices I am getting the following error:”An error occurred while trying to run the script.”The same script is running perfectly in the simulator or on an iOS 4.3.3 device.How can I solve this problem?
user293895
ios ios-ui-automation
I have an app that I am trying to automatically debug using a shotgun approach (randomly touching the app for a long period of time). I am currently using UIAutomation and this script:var target = UIATarget.localTarget(); var app = target.frontMostApp(); var window = app.mainWindow();target.delay(2);window.tapWithOptions( { x:160.0, y:370.0 } );target.delay(5);for(i=0;i<=100000;i++) {xPoint = Math.floor(Math.random()*319+1)yPoint = Math.floor(Math.random()*479+1)window.tapWithOptions( { x:xPo
nschum
iphone ios testing ui-automation ios-ui-automation
I have had some strange, hard to reproduce crashes, when testing my app with an ad-hoc version on my iPhone. The crashes happened after changing from my app to the dashboard (or other app) and then changing back to the app again.Is there a way to use UIAutomation in a way to perform these changes automatically?Thanks in advance.
RobEarl
cocos2d-iphone bdd ios-ui-automation zucchini
Is it possible to use UIAutomation with cocos2d or any opengl application for that matter?Specifically I want to use the zucchini framework to test my cocos2d game but that just uses UIAutomation anyway.
fogwolf
ios ui-automation ios-ui-automation
I think this is a first – I’m getting an error and the exception constant that I’m getting back returns nothing when I search for it on Google.Basically I’m trying to run UI Automation on my iOS app from the CLI and am getting the following error message:2013-02-22 13:12:17.820 ScriptAgent[16626:2e07] +[UIAXElement initialize]: UIAutomation never received kAXAccessibilityLoaded. Waited 20.02 seconds.2013-02-22 13:12:17.826 ScriptAgent[16626:2e07] Unexpected error in -[UIAXElement_0xad343c initi
c roald
ios-ui-automation
I’m trying to break up my UIAutomation test scripts into chunks, to make it possible to run them one piece at a time or all together. So I have a structure:all-tests.js:#import “tab-dates.js” #import “tab-temperatures.js”tab-dates.js:#import “../../../Libraries/tuneup_js/tuneup.js” #import “dpl_assertions.js”var target = UIATarget.localTarget(); var app = target.frontMostApp();test(“Verify date view is shown”, function() {assertEquals(tabBar.selectedButton().name(), “Date”); });Both of these li
codemau5
ui-automation ios-ui-automation
For this line of test code : view.scrollViews()[0].tapWithOptions({tapOffset:{x:0.32, y:0.25}})I am getting this error 2012-11-02 18:09:23 +0000 None: Script threw an uncaught JavaScript error: target.frontMostApp().mainWindow().scrollViews()[0] could not be tapped on line 244 of feature.js 2012-11-02 18:09:23 +0000 Debug: target.frontMostApp().mainWindow().scrollViews()[0].tapWithOptions({tapOffset:{x:”0.32″, y:”0.25″}}) 2012-11-02 18:09:23 +0000 Debug: target.frontMostApp().mainWindow().scroll
johngraham
javascript ios scope integration-testing ios-ui-automation
I’ve set up some UIAutomation scripts that will eventually become jenkins tests. The UIAutomation scripts do not output in jenkins-friendly format, so I’m using tuneup_js, specifically this failure exception.When a test fails, I can throw a custom FailureException. The exception is gracefully caught and failure output is properly logged. The output is Error: FailureException: “hello world”.My problem occurs when I try to throw that same FailureException inside an onAlert handler, UIATarget.onAle
ralphbert
ios-ui-automation ui-testing ios6.1
I just want to test my iOS UI with UI Automation but I got stuck when it comes to enter text into UITextFields. The documentation says that the method “setValue(…)” should do the trick but it doesn’t.I always get this error:Script threw an uncaught JavaScript error: Unexpected error in -[UIATextField_0x9952690 setValue:], /SourceCache/UIAutomation_Sim/UIAutomation-271/Framework/UIAElement.m line 1142, kAXErrorSuccess on line 15 of login.js, #0 setValue() The code looks like this:var textfields
user1060816
ios ios-ui-automation
I’m working on my first UI Automation script and am encountering a failure at the deactivateAppForDuration line below:// Verify password field is shown when app is moved to the foreground UIALogger.logMessage(“move app to background”); target.deactivateAppForDuration(10); UIALogger.logMessage(“move app to foreground”);The error I get from Instruments is:Script threw an uncaught JavaScript error: Cannot perform action on invalid element: UIAElementNil from target.frontMostApp().switcherScrollView
bollhav
ios-ui-automation
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 typedtarget.frontMostApp().keyboard() failed to locate key ‘N’ Script threw an uncaught JavaScript error: target.frontMostApp().keyboard() failed to locate key ‘N’I have a localized swedish keyboard.Anyone know if this a bug or something I’ve missed?
Jack
javascript ios-ui-automation
Script threw an uncaught JavaScript error:Cannot perform action on invalid element: UIAElementNil from target.frontMostApp().mainWindow().popover().actionSheet().buttons()[“Save Note”]Code:var target = UIATarget.localTarget(); var app = target.frontMostApp(); var window = app.mainWindow(); target.logElementTree(); UIALogger.logPass(“Stick Note Save Start”); app.navigationBar().toolbar().buttons()[“Plus”].tap(); app.keyboard().typeString(“Ki”); window.popover().actionSheet().buttons()[“Save Not
marmor
ios uiscrollview ios-ui-automation uicollectionview
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 target = UIA
Ortwin Gentz
iphone ios instruments ui-automation ios-ui-automation
I tried the tapAndHold() function from UIAElementvar target = UIATarget.localTarget(); target.frontMostApp().mainWindow().buttons()[“Button”].tapAndHold() target.captureScreenWithName(“shot”)but this fails with a JavaScript error: ‘undefined’ is not a function (evaluating target.frontMostApp().mainWindow().buttons()[“Button”].tapAndHold().Update:I also triedtarget.frontMostApp().mainWindow().buttons()[“Button”].touchAndHold(1.5) target.captureScreenWithName(“shot”)which at least does highlight t
tech_learning
javascript ios ios-ui-automation uiaccessibility
I have added an accessibility identifier to a label so that I can use it in my UIAutomation javascript files. How do I access the text on the label using accessibility identifier?Suppose “aLabel” is the accessibility identifier and my javascript function to access the text on that label is:appLabelValue:function() { return this.getElement(‘aLabel’).value(); }I even tried replacing .value() with .text() in the above method but I am getting same error for both i.e. undefined is not a function.Plea
satyajit
javascript ios node.js npm ios-ui-automation
According to apple’s documentation I can import one JS file into another with an import statement. And yes I am able to use JS functions and recursively call other JS functions.But can I include node modules into my automation. Node/npm module seems to have a lot of tools that makes life easier and avoid code duplication.And actually I was able to use one node module called moment.js through the following call in my code #import “../node_modules/moment/moment.js”But I am not have the same luck w
Web site is in building