Hi TestQA1.
You are correct, you cannot call the WaitProperty method on the object if it doesn't exists. So, doing your own delay and "wait" might be needed. Something like this could work, where you check if the object is null first.
var requiredObject = ;// your mapped object or code for finding the object;
// loop counter
var sanity = 0;
while (requiredObject == null || !requiredObject.Exists || !requiredobject.VisibleOnScreen)
{
Delay(1000);
// make sure to have an exit condition so it doesn't get stuck in a infinite loop
if (sanity > 60)
{
Log.Error("requiredObject not found"); // or throw an error if you have this code in a try/catch
break;
}
// if you are searching for the object then you might want to place your search code here too, to search for it again
sanity++;
}
return requiredObject