MobileSafari.app doesn't have accessibility labels is there a way to capture (record) events so that i can use in the javascript for UI Automation?
there was a previous post which made that statement but didn't provide any instructions as to how to record using the javascript editor
details please
thank you in advance!
Just open a new script in your Instrument session, and push the little record button at bottom of the page (appears on the screenshot). Now use your app and you should get that kind of stuff:
Now you can see the value or the name of your buttons and use it to write your own scripts. I'm not a programmer, so this tool is very useful for me.
Hope it will be for you too. :)
First print the element hierarchy on any object you want and you can access the elements through indexing. Ex: target.logElementTree();
来源:https://stackoverflow.com/questions/9815765/ui-automation-how-to-capture-record-using-javascript-editor