I need some help from here about how to make an generic waitforexistance method, is it even possible??
I've been trying to do it but with no luck...
this was my idea, i want to send in anyitem or window and wait for that item till timeout, but since i cannot send in any ranorex generic item it fails there

waitforexistance ( Ranorex item?, String timeout){
int time =0;
while(!item.exists()){
Thread.Sleep(1000);
time++;
if(time>timeout)
throw new Exception("Timeout reached");
}
}
I wana send in any item, button, window, listitem etc... is this even possible??
Or maybe there is already something like this which i dont know about

Any help would be appreciated, thanks