Micro Focus QTP (UFT) Forums
Handling Save Windows Diolog - 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: Handling Save Windows Diolog (/Thread-Handling-Save-Windows-Diolog)



Handling Save Windows Diolog - tbull - 04-01-2010

Can any one tell me how to set the value in the dilog box that come in the windows.When i click on a pdf i can options to open/save/cancel options.i am able to open the Pdf uing Divice replay.I am able to get to a point of clicking the save button.but i am not able to handle after that.
this is what qtp has recorded.even when i try to play back it is giving an error to set the pdf name.

Code:
Browser("Private Empty Car Storage(PECS_2").Dialog("File Download").WinButton("Save").Click


Dialog("0% of  from xtest.c02.my.uprr._2").Dialog("Save As").WinEdit("File name:").Set "pdf"
Dialog("0% of  from xtest.c02.my.uprr._2").Dialog("Save As").WinButton("Save").Click
Dialog("0% of  from xtest.c02.my.uprr._2").WinButton("Close").Click



RE: Handling Save Windows Diolog - vinodkk - 04-07-2010

Hi,

Try send keys method..


Code:
Browser("Private Empty Car Storage(PECS_2").Dialog("File Download").WinButton("Save").Click
Dialog("0% of from xtest.c02.my.uprr._2").Dialog("Save As").WinEdit("File name:").Click
set oshell = createobject("wscript.shell")
oshell.sendkeys "p"
oshell.sendkeys "d"
oshell.sendkeys "f"
set oshell = nothing
Dialog("0% of from xtest.c02.my.uprr._2").Dialog("Save As").WinButton("Save").Click
Dialog("0% of from xtest.c02.my.uprr._2").WinButton("Close").Click