Micro Focus QTP (UFT) Forums
Progress Bar of Internet Explorer - 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: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: Progress Bar of Internet Explorer (/Thread-Progress-Bar-of-Internet-Explorer)



Progress Bar of Internet Explorer - rishi0810 - 05-11-2011

Hi,

Does anyone know if there's a way to work with the progress bar of IE??

I want to wait till it has been completed so that I can proceed.



RE: Progress Bar of Internet Explorer - manabh - 05-11-2011

Hi,
Instead you can use page's status property is complete or not. Need to google for exact property name used in QTP Wink


RE: Progress Bar of Internet Explorer - sasmitakumari - 05-11-2011

You can spy on the status bar of your IE, it should be showing something like Browser("xyz")>Winstatusbar("abc") in spy tree and on highlighting on winstatusbar, you will be seeing properties for it. I observed 'regexpwndtitle' prop is having value 'done'. Try with GetROProperty("regexpwndtitle") = "done".


RE: Progress Bar of Internet Explorer - UFTEnthusiast - 05-12-2011

Hello there!

Use ReadyState Property.


I hope this helps.
Use ReadyState Property.

Thank you so Much,
UFTEnthusiast


RE: Progress Bar of Internet Explorer - tdevick - 05-12-2011

Rajendraprasad,

How does waiting for "Browser(<browser-name>").object.ReadyState = 4" differ from just calling "Browser(<browser-name>).Sync"?

I have always used Browser(<browser-name>).Sync. That works under most conditions. Sometimes it does not wait until the browser has finished drawing the page (maybe due to javascript or other dynamic data).

I have tried both ways with problem pages and saw no difference. I suspect that Browser.Sync may be nothing more than waiting on ReadyState = 4.

How do you wait for ReadyState = 4? without looping every x seconds until some y seconds has passed? QTP help or WaitProperty says, "you can instruct QuickTest to wait for a particular string to appear in a static text control". But, ReadyState is not a "static text control".

I did find an example that sounds like what you're talking about under help for WaitProperty:

Code:
returnStatus=Browser("mybrowser").Page("mypage").Link("mylink").WaitProperty("attribute/readyState", "complete", 5000)

When I execute the above code against my link, which is completely drawn and ready, I always get a returnStatus of FALSE.
I also tried replacing "complete" with "4", but get the same result.

Can you explain further please, Rajendraprasad?

Tim


RE: Progress Bar of Internet Explorer - supputuri - 05-13-2011

Hi tdevick,

I do agree with you but the only with is the issue with QTP sync is commonly noticed. In order to handle this situation, I always use my own function rather than depending on the QTP method.
here is the loc:
Code:
Browser("TestBrowser").Refresh
StartTime = Now()
'Used DateDiff  method as Timeout.
Do until  Browser("TestBrowser").Object.ReadyState = 4 or DateDiff("s",Now(),StartTime)>20
    wait 1
Loop
If Browser("TestBrowser").Object.ReadyState = 4 Then
    msgbox "Done"
    Else
    msgbox "Browser was not loaded with in 20 seconds."
End If

Let me know if you need any info or if it doesn't work.