Tomas Vana
Tomas Vana

Reputation: 18775

Debugging UIAutomation scripts in Instruments

I have recently tried using UIAutomation framework for some simple automated UI tests for iOS devices. While interesting and relatively powerful, I find it quite tedious to write the scripts without having the possibility of debugging them.

Is there any way to debug the UIAutomation scripts ? The emphasis here is on the debugging of the script itself, i.e. the javascript part, I have already found the explanation of how to debug the tested application itself here.

Upvotes: 5

Views: 1371

Answers (1)

dagett
dagett

Reputation: 81

I use these techniques to debug UI Automation scripts:

  • window.logElementTree(); // to see where you are in the UI structure
  • UIALogger.logMessage(msg); // ... and where you are in your script

Jonathan Penn describes it here.

Upvotes: 1

Related Questions