Search code examples
iphoneiosinstrumentsui-automationios-ui-automation

Recording UIAutomation events in Instruments: get numeric instead of string value


when capturing events in the Automation event editor of Instruments (with the neat record button blow the editor), I often get responses like this:

target.frontMostApp().mainWindow().buttons()["Filter"].tap();

After capturing, I have the option to set the captured event to equivalent code visually.

enter image description here

Question: is there a way to set the captured events to the generic/numeric-value instead of the string-value by default? I know I can change each of them by hand, but usually I would like to have the

target.frontMostApp().mainWindow().buttons()[2].tap();

value, rather than this way

target.frontMostApp().mainWindow().buttons()["Filter"].tap();

Many thanks in advance


Solution

  • I asked Apples technical support - there is no such possibility in Instruments yet.