Forum Discussion
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);
It 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.
- sergi10 years agoContributor
I already tried putting a delay before and it made no difference at all.
We could argue whether it makes sense that the second time is faster, but it doesn't make any sense that it takes so long to succesfully find a view that is already visible and in the first or second level of the root view.
The same behaviour is observed when using the fullpath of the object.
- Marsha_R10 years agoModerator
We could also argue that two seconds is not a long time.
- sergi10 years agoContributor
Marsha_R wrote:We could also argue that two seconds is not a long time.
I don't think that's arguable.. 2 seconds to find a view that is already there and only within 2-3 levels of children is insane. Especially when TC is able to find any other view within 50-60ms...
NisHera wrote:Which vertion of TC you are working with and what application you are testing?
10.60 and I'm testing a .NET+WPF application.
Related Content
- 6 years ago
- 8 years ago
Recent Discussions
- 9 hours ago