UI Automation: scrollToVisible() gives kAXErrorFailure

Originator:michael
Number:rdar://12339174 Date Originated:20-Sep-2012 08:44 PM
Status:Open Resolved:
Product:Xcode Product Version:4.5
Classification:Serious Bug Reproducible:Always
 
Summary:
On Mountain Lion and the GM of Xcode 4.5, calling UIAElement.scrollToVisible() on a valid element results in UIAutomation framework error. This did NOT happen in Xcode 4.4.1. This is affecting our automated regression suite from running correctly (we have around 150 tests taking 2 hours to run that used to run fine, but now do not).

Steps to Reproduce:
Create a new project. Add a button onto the main window. Run UI Automation instrument. Create blank script. Paste the following script and press play:

var target = UIATarget.localTarget();
target.frontMostApp().mainWindow().buttons()[0].scrollToVisible();

Expected Results:
No error.

Actual Results:
The following error is displayed in the log and the test run fails:

Script threw an uncaught JavaScript error: Unexpected error in -[UIAButton_0x9e0e890 scrollToVisible], /SourceCache/UIAutomation_Sim/UIAutomation-271/Framework/UIAElement.m line 1545, kAXErrorFailure on line 4 of New%20Script

Regression:
Does not happen with Xcode 4.4.1. Upon installing Xcode 4.5, the script will fail.

Comments

Same for me - XCode 4.6, iOS 6.1.

We are also having dozens of UIAutomation tests and this bug is really a critical one.

I am also seeing the same issue on Xcode 4.6 on phones with iOS version 6.1 Unexpected error in -[UIAStaticText_0x1e02b160 scrollToVisible], /SourceCache/UIAutomation/UIAutomation-271/Framework/UIAElement.m line 1545, kAXErrorFailure

Test case fails only with version 6.1. 5.1 versions are running fine. It is badly affecting our automated regression test suite

By sandhya2012 at Feb. 1, 2013, 6:48 p.m. (reply...)

Summary:

The problem reproduces in xCode 4.5.2, I downgraded to xCode 4.3 (together with using Instruments 4.3 too) and the problem solved completely.

Boaz Warshawsky NDS Israel


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!