I have a .NET 2.0 app that slowly (from QTP's perspective, not a human user's perspective) adds .NET controls to a .NET view, where the the view is being attached to a region of a .NET window.
So the display slowly (again from QTP's perspective) morphs from ScreenA to ScreenB.
How the controls are loaded into ScreenB is non-deterministic.
This is of course creating a "screen <u>completely</u> ready" sync nightmare.
Before I attempt to go do battle with the app developers, is there anyway to reliably sync QTP with an .NET app under these conditions?
I know that with a web app, QTP has the luxury of being able to ask the "application" (the browser), is it "done loading" a new page. But it seems that QTP is at the mercy of each Windows and/or .NET client/server app (actually the client part) to load the screen synchronously, such that when the .Exist() method returns True, the screen is ready to be interacted with.
I hope this question is clear, as it took me a few days to figure out why my navigation throught this .NET app failed at real-time QTP execution speeds, but never failed while using the debugger. Hopefully others have scaled this mountain before me...
[ QUOTE ]
Hey, Why dont you try Wait property of the control. Sync is misleading sometimes. I have faced this problem too sometime back.
[/ QUOTE ]
I guess I should have mentioned that I understand I can to a "wait on property X..." statement, but then that is a lot of potential added statements if you do this control by control.
This though is what I am planning to do if I can't reliably determine that the screen is done loading. I think I am going to introduce a "pacing" control as well (say 1 or 2 seconds), so that the interaction with the screen is more realistically like a real user--AND I have no idea what the app will do if a control is "ready" and is clicked while the screen is being updated.
well yes yoou will have to work with wait property of control as well as page ready state & may be wait statement. thats wat i do . i use all three of them. and my scripts are stable and very good time wise.