Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 310
Tomas Vana Avatar asked Nov 13 '22 08:11

Tomas Vana


1 Answers

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.

like image 65
dagett Avatar answered Nov 16 '22 02:11

dagett