can I set accessibility identifier in interface builder? Xcode4.2

后端 未结 5 1635
孤街浪徒
孤街浪徒 2020-12-09 08:31

I can only set Accessibility Label in interface builder, but in UI Automation,I need Accessibility Identifier to get the UI elements. any way to do this?

5条回答
  •  一整个雨季
    2020-12-09 09:12

    I was wondering, do you want to test things from xib that don't have IBOutlet? Can someone with more experience share his/hers thoughts?

    Here is my view on the subject. If you don't assign IBOutlet to a button/label/texBox or what ever this means you won't change it from the code. The control will be static and you can see it in Interface builder. If you add an IBOutlet to a control then you can add acessibilityIdentifier from the code.

提交回复
热议问题