Micro Focus QTP (UFT) Forums
QTP Not Identifying a window at times. - 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: QTP Not Identifying a window at times. (/Thread-QTP-Not-Identifying-a-window-at-times)



QTP Not Identifying a window at times. - sherinvg - 07-21-2008

Hi,
My problem is, in my application i have a file download window.I have to get the "text" property from that file download window.
I wrote scripts for that and now the issue is it will recognize that window at times and for certain times it is not.
Can anyone help me in solving this issue...
The script is given below

Code:
Do
var_exist=Browser("Browser.").Dialog("File Download_2").Exist
nme=Browser("Browser.").Dialog("File Download_2").WinObject("Name:").GetROProperty ("text")
Loop until var_exist="True"


Since it takes sometime to display the 'File download' window i gave it in a Do Loop.


RE: QTP Not Identifying a window at times. - surya_7mar - 07-28-2008

Using WinObject is always a problem.. A

Why are using WinObject, QTP shows this when it does knownn what the property is.

I think you are mis leaded.


RE: QTP Not Identifying a window at times. - sherinvg - 07-29-2008

But when I spy that particular object it is showing its property as WinObject.
Can i know what is the issue if we use WinObject?

Thanks & Regards,
Sherin.


RE: QTP Not Identifying a window at times. - surya_7mar - 07-29-2008

WinObject means QTP not able to identify the object. So we can do any QTP related things on that.

My suggestioon on this is...

while execution whenever you have an Attacment it will ask for Whether to Open or Save..

Now Dont Open it , Save it directly.

Try to record like this.. You will be in good shape


RE: QTP Not Identifying a window at times. - sherinvg - 07-30-2008

But my problem is QTP is not identifying the Window itself .

Code:
' var_exist=Browser("Browser.").Dialog("File Download_2").Exist '
.For this statement
sometimes the value returned will be FALSE even though the window is present.

For me the line
Code:
'nme=Browser("Browser.").Dialog("File Download_2").WinObject("Name:").GetROProperty ("text")'
is executing fine if it identifies the Window.

Can i know what has to be done if QTP recognizes an object as WinObject?Should i create virtual objects for all the Objects which is being identified as WinObjects by QTP?

Thanks & Regards,
Sherin.