UI Automation - how to capture - record using javascript editor

北战南征 提交于 2019-12-07 16:52:11

问题


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!


回答1:


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. :)




回答2:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!