Waiting for onscreen message to disappear
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Waiting for onscreen message to disappear
Hello
We are testing a desktop application.
When changing forms on the application, loading up a customer etc, the desktop app with display a message on the bottom left of the application screen.
e.g. "Loading Customer"
This message will fade out and disappear after a few seconds, i.e. once everything on the form is ready for us.
We want to delay trying to read buttons and controls, interacting with the form in any way until after this message fades out completely.
We would rather not use a set delay timer.
As the window/form exists, I don't see how a wait on the window to exist or similar would be useful.
Any ideas how we could accomplish this?
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If You are sure that this object actually exists on-screen You can use this function for example:
function waitUntilExist(o, count) { var count = count || 60; for (var i = 1; i <= count; i++) { if (o.Exists == true) { aqUtils.Delay(1000); } else { break; } } }
But this will only work for You If .exist is available. Or try to create some kind of do() while {}.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Wamboo
But unfortunately the message isn't an obect that can be obtained via object spy, not is it in its own text box or similar.
Otherwise it would be a lot easier.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try to use ImageRepository instead or enable Text Recognition in TestComplete.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@DanielM75 wrote:
Thanks Wamboo
But unfortunately the message isn't an obect that can be obtained via object spy, not is it in its own text box or similar.
Otherwise it would be a lot easier.
Any object can be found somewhere as an object. If it's part of the application that generates a UI, it's there somewhere.
As a minor correction to @Wamboo , though. I would not use just strict "Exists" of the object "o". If "o" stops existing, calling "Exists" on it will generate an error that the object no longer exists. I would pass in to that function not the object but the object name or property set or something and use something like "FindChildEx" to find the object in a loop.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great thanks you
