Forum Discussion
sergi
10 years agoFrequent Contributor
No, there's no background work ongoing.
If I do the following, the second time I try to find that view it's immediate.
No matter if the MessageBox is already being displayed when I execute my code or I do something to make the MessageBox be displayed, it takes almost 2 seconds to find it.
var base = Sys.Process("MyProcessName");
// This takes ~1900ms
base.FindChild("ClrClassName", "MessageBoxView", 3);
// This takes ~50ms
base.FindChild("ClrClassName", "MessageBoxView", 3);
Marsha_R
Champion Level 3
10 years agoIt makes sense that the second one would be faster because whatever is holding up the object isn't a problem any more by the time the first one executes.
Try putting a Delay=2000 right before the first one and see what happens.