Micro Focus QTP (UFT) Forums
DP issues with File Download dialog and button - 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: DP issues with File Download dialog and button (/Thread-DP-issues-with-File-Download-dialog-and-button)



DP issues with File Download dialog and button - mv8167 - 05-19-2011

I am having problems with my DP states. Can someone plz ;-) look at these two statements (my attachment shows the OR) I cannot seem to find my dialog box and buttons.

Code:
.Dialog("text:=File Download","window id:=1","index:=1").Highlight

and

Code:
.WinButton("text:=/&Open","nativeclass:=button").Click "Open"



RE: DP issues with File Download dialog and button - tdevick - 05-20-2011

I don't recommend using "window id" in your expression - it could change from one run to the next. I'd also leave out the "index:=1" (the "index" value is the index of that object type on the page if there are multiple objects of that type that have the same identifying information). Usually the index is 0 unless you have multiple of the same object type with the same identifying information on the page.

Also, don't escape the "&" characters in the second line in your example (don't put "\" in front of it). The text value actually contains the "&" symbol. I've seen this a lot in IE.




RE: DP issues with File Download dialog and button - mv8167 - 05-20-2011

Thx, both of these were great helps

but... ;-) these still dont work

Code:
.WinButton("text:=Cancel","nativeclass:=Button","Index:=0").Highlight(0)
   .WinButton("text:=&Open","nativeclass:=Button","Index:=0").Highlight(0)
   .WinButton("text:=&Open","nativeclass:=Button","Index:=0").Click

Index:=1 also not

Any other thoughts? thxxxx ;-)
My Winbutton still failed. So I combined the two statements and it seems to work.

Code:
.Dialog("text:=File Download","Location:=1").WinButton("text:=Cancel","nativeclass:=Button","Index:=1").Highlight(0)

thx tdevick


RE: DP issues with File Download dialog and button - sundari.msls - 05-24-2011

What is the With object which you are using?

Usually it should be browser. It works without the object dot also. (remove the dot in front of dialog)
Try with the following modified statement:
Code:
Dialog("text:=File Download.*").WinButton("text:=Cancel","Index:=1").Highlight(0)



RE: DP issues with File Download dialog and button - Anand - 05-25-2011

Please use the forum [VB Scripting/Descriptive Programming] for DP issues.