How to automate desktop legacy application?

Click based on Image, or Click Text, or Click OCR Text.