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?
According to this page
http://developer.apple.com/library/ios/#documentation/AnalysisTools/Conceptual/WhatsNewInstruments/NewFeatures42/NewFeatures42.html
UIAutomation will use the accessibilityLabel if the accessibilityIdentifier is not set, so you can use that instead for now. This probably isn't best practice though because the accessibilityLabel is visible (or rather audible) to the user if they are using VoiceOver, but it's okay as long as you give the labels names that are meaningful to humans.
Hopefully Apple will add a way to set the accessibilityIdentifier in IB in future, but for now you'll have to set it in code, or use something else such as the view tag to target views for automation.