I have to verify whether one label in the app matches the referenced image or not. So please tell me how it can be done using UIAutomation. Thanks in advance.
Your only hope using just the xCode Instruments software is to use the UIAHost.performTaskWithPathArgumentsTimeout
function. You'll have to send the screenshot (which you can take inside of the Instruments software) to an image processing script that you've written and have saved in some accessible location and then return the result. If you use a large enough timeout you won't want to worry about the script moving on before getting the result back from your outside script.
I think, but am entirely unsure, that there are third party automation softwares that include image processing stuffs.