Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem with file "save as dialog box"
12-09-2009, 06:18 PM
Post: #1
problem with file "save as dialog box"

hi all ,

i am automating a web application . The web application has a test case to download different version of a file by clicking on download button.
following is the record using QTP
------------------------------Cut from original code----------------------
Dialog("0% of 15_pkgId129170115_2.5.4.").Dialog("File Download").WinButton("Save").Click
Dialog("0% of 15_pkgId129170115_2.5.4.").Dialog("Save As").WinEdit("File name:").Set "c:\s40selfupdater\data\test.jar"
Dialog("0% of 15_pkgId129170115_2.5.4.").Dialog("Save As").WinButton("Save").Click
Dialog("0% of 15_pkgId129170115_2.5.4.").WinButton("Close").Click
---------------------------- End of Cut---------------------------------
this cod is for downloading a file called ""15_pkgId129170115_2.5.4"" as you can see from code
now the problem is :if the file name changes from 15_pkgId129170115_2.5.4 to some "xyz" QTP displayed an error "The "0% of XYZ." Dialog object was not found in the Object Repository. which is quite genuine.

now i want to script it in such a way that even if file name changes to xyz it should work without any error.

I tried with following but failed:
---------------------------try 1------------------------------------
Dialog(*).Dialog("File Download").WinButton("Save").Click
Dialog(*).Dialog("Save As").WinEdit("File name:").Set "c:\s40selfupdater\data\test.jar"
Dialog(*).Dialog("Save As").WinButton("Save").Click
Dialog(*).WinButton("Close").Click
--------------------------try1 end----------------------------------

--------------------------try2---------------------------------------
Dialog("File Download").WinButton("Save").Click
Dialog("Save As").WinEdit("File name:").Set "c:\s40selfupdater\data\test.jar"
Dialog("Save As").WinButton("Save").Click
Dialog("*").WinButton("Close").Click
-------------------------0try2 end----------------------------------
Find all posts by this user
Quote this message in a reply
12-09-2009, 09:22 PM
Post: #2
RE: problem with file "save as dialog box"
hi guys ,

i tried one more thing
enabling the smart object identification property of the dialog box.
but its disabled by default . i cant enable it
Find all posts by this user
Quote this message in a reply
12-10-2009, 10:28 AM
Post: #3
RE: problem with file "save as dialog box"
In your repository change the text '0% of 15_pkgId129170115_2.5.4' of Dialog("0% of 15_pkgId129170115_2.5.4.") object to
'.* of .*'

Thanks,
~Saket Kumar
[Linkedin][pdf Api for QTP]
It's so hard when I have to, and so easy when I want to...
Find all posts by this user
Quote this message in a reply
12-10-2009, 11:44 AM
Post: #4
RE: problem with file "save as dialog box"
hi @saket,

thanks a lot . its working Smile
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  QTP file compare - ignoring file structure Fede 3 540 02-17-2012 02:48 AM
Last Post: Parke
  Microsoftoutlook 2003 Email from QTP Script waring box problem Uma 5 1,039 11-30-2011 02:05 PM
Last Post: tirru
  Dialog box error while QTP scripts run from VM Desktop rahuldps 2 1,194 11-14-2011 01:47 PM
Last Post: ravi.gajul
Exclamation Problem selecting client certificate from IE dialog pumpkin 1 634 11-02-2011 08:55 AM
Last Post: Newbie2011
  Save a file in Server RekhaPramod2010 1 803 04-14-2011 07:44 PM
Last Post: basanth27

Forum Jump:


User(s) browsing this thread: 1 Guest(s)