How to automate desktop legacy application?

I tried the mentioned activities, But no luck sometimes the bot is working and sometimes the bot is failing to detect. As there are no proper selectors hence I couldn’t fine tune them.