Micro Focus QTP (UFT) Forums
QTP is waiting for the page to load succesfully and then doing actions - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: QTP is waiting for the page to load succesfully and then doing actions (/Thread-QTP-is-waiting-for-the-page-to-load-succesfully-and-then-doing-actions)



QTP is waiting for the page to load succesfully and then doing actions - bostonma - 11-12-2010

Hi,

I have a scenario where in our application once we browser thru few pages one of the page seems to load very slowly in IE (current version is IE8.0 takes atleast 2-3 min) which is a bug and this is not the case in Firefox.
For user it does look like page is loaded succesfully unless you notice specifically in the Status bar as"1 item remaining" as supposed to "Done" .
Is there a way to "Tell" QTP to go forward and do the next action and not to wait until it sees Done on the page?
Any help is appreciated!


RE: QTP is waiting for the page to load succesfully and then doing actions - Anu123 - 11-12-2010

Look for the existance of the object, which can navigate to next action.
Take out the Sync or wait statement for this page


RE: QTP is waiting for the page to load succesfully and then doing actions - manishbhalshankar - 11-30-2010

You can use the Do While loop with If statement for this.


RE: QTP is waiting for the page to load succesfully and then doing actions - bfakruddin - 12-01-2010

Here, you can check with "Done" Statement on browser or, Consider any of the object on page like "OK" or "Submit" buttons which is disappeared. Develop a code as it can be go to next step whether the "Done" statement appeared or "Object" disappeared. But, "Done" validation is mandatory... as a good test engineer, consider this first then go with workaround.

Eg:
Code:
Dim Valid
Valid = Object.Exist
If (Valid = True) Then
Do while Not Valid=True
Valid = Object.Exist
Loop
End If
'Once the Valid is False, means that the page is navigated... or

If you find that even the object disappears, the page is not navigated fully,
You can check the Existence of the next page's object (If you have Object's information). I think we have the next page objects too... we can proceed even on this procedure.

any issues let me know.