I'm currently creating automated test cases for a WPF application using Microsoft UIAutomation (UIA) framework. I'm able to locate objects/elements using AutomationElement class but sometimes application take more time to load and this fails my test cases, because test cases are trying to click an object which is not yet visible on the screen.
I thought of implementing implicit wait in my test cases (don't want to use Thread.Sleep) where my test cases will first wait for the object to appear and then perform action. But unfortunately I'm not able to find any way of implementing implicit wait.
How can I implement Implicit Wait in my test cases using UIA?