Micro Focus QTP (UFT) Forums
WaitProperty not working - 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 Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: WaitProperty not working (/Thread-WaitProperty-not-working)



WaitProperty not working - mv8167 - 03-06-2012

I have been trying to use the WaitProperty and Sync.

As my Waitproperty I have tried a variety of ways:

Code:
Browser("Wisdom").Dialog("File Download").WaitProperty "visible", "True", 60000
'Browser("Wisdom").Dialog("File Download").WaitProperty "text", "File Download",  60000
Dialog("File Download").WaitProperty "visible", "True", 60000
Dialog("File Download").WaitProperty "text", "File Download", 60000
... which all returned Warnings.

Then I tried Sync:
Code:
Browser("Wisdom").Dialog("File Download").Sync
... which all returned was a Run Error of syntax error

I can Exist on the dialog box. Does anyone have advice on using the WaitProperty or Sync?

thx


RE: WaitProperty not working - sshukla12 - 03-06-2012

Hi,
Browser("Wisdom").Dialog("File Download").Sync will show the run time error when page is already being loaded.

Regards,
Sankalp


RE: WaitProperty not working - Saajo87 - 03-06-2012

When you perform any Operation on Dialog.some images or label's are also appears/change. so if you are not able to wait for/to open particular dialog. you can check other Image Existence or label's current Values also......


RE: WaitProperty not working - mv8167 - 03-06-2012

Thx Sankalp,

Sync is not alowed on a Dialog box as per QTP. At least I get an error message indicating this. ;-)


Thx Saajo87,

I have tried my wait properties on buttons on the dialog box but I get a Run Error

I tried the following on a new test page with the dialog box open:

These 3 passed
Code:
Browser("Wisdom").Dialog("File Download").WaitProperty "visible", "True", 60002
Browser("Wisdom").Dialog("File Download").WaitProperty "text", "File Download", 60002
Browser("Wisdom").Dialog("File Download").WaitProperty "regexpwndtitle", "File Download", 60002

These 3 had Warnings
Code:
Browser("Wisdom").Dialog("text:=File Download").WaitProperty "visible", "True", 60003
Browser("Wisdom").Dialog("text:=File Download").WaitProperty "text", "File Download", 60003
Browser("Wisdom").Dialog("text:=File Download").WaitProperty "regexpwndtitle", "File Download", 60003

I took the top 3 passed WasitProperty statements an stuck them in my function library where they are needed and the first gave a Warning, the second two passed. I removed the first WaitProperty statement and then the second WaitProperty gave a Warning and the 3rd WaitStatement passed.

So, I am guessing, that after I select the link that opens the dialog box I need to Wait(1) as the WaitProperty fires ioff a Warning to soon (even though i have a minute of waiting for the dialog box) and thus my WaitPropert just dosent wait like it should?

Anyone have experiance like this?

;-) Lor


RE: WaitProperty not working - sshukla12 - 03-12-2012

Hi,
Increase the value for Time out..that should resolve your problem.

Regards,
Sankalp