Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

QTP - windows 'File Save' Dialog not visible

This is a discussion on QTP - windows 'File Save' Dialog not visible within the QTP forums, part of the Software Testing category; Hi all, On recording a particular Web application with QTP,Have came across a problem for which I havent found a solution so far.. The script of importance is as follows: ...

Go Back   Geeks Talk > Software Testing > QTP
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 03-14-2009
Junior Member
 
Join Date: Aug 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
jennifer_2008 is on a distinguished road
QTP - windows 'File Save' Dialog not visible

Hi all,

On recording a particular Web application with QTP,Have came across a problem for which I havent found a solution so far..


The script of importance is as follows:
Code:
Browser("Personalized Start Page").Page("XYZ").Frame("mainFrame_4").Link("address.csv").Click
Browser("Personalized Start Page").Page("XYZ").Sync
Dialog("0% of dms.php from XYZ-").Dialog("File Download").WinButton("Save").Click
My problem is that on recording the application with QTP and clicking the "address.csv" link another browser window comes up temporarily followed by the Windows "FileSave" dialog.The browser window which came up closes down when the Windows "FileSave" dialog is visible and I save the file to a windows location.

On the "Record and Run" settings under Qtp,have activated settings for web and windows applications.



But when I run this recorded script,and after the "address.csv" click,The browser window comes up and goes down,No Windows "FileSave" dialog comes up and the QTP shows the error Dialog("0% of dms.php from XYZ-") object is not found,though this object is there in the repository.

Have tried putting the Dialog("0% of dms.php from XYZ-").Exist property.But the "Exist" property is not recognised by the dialog at all.

Any help in this direction is appreciated..

Thanks in advance
J
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-16-2009
Expert Member
 
Join Date: Jan 2007
Location: India
Posts: 208
Thanks: 3
Thanked 19 Times in 19 Posts
NawabShaikh is on a distinguished road
Re: QTP - windows 'File Save' Dialog not visible

If I have understood it like the Dialog Box is not recurrent across executions...If this is the case..then you can use the If Else block to perform related checks, as mentioned in the post you are not able to use Exist Property....Please use a checkpoint and use the Boolean result for actions on the Dialog Box..

Something like
Browser(B).Dialog(d).checkpoint check(Dialog)..

Last option ..you can check for the TO Properties in case they are not aligned to the dynamic nature of the Dialog Box..

Regards,
Nawab
Reply With Quote
  #3 (permalink)  
Old 03-16-2009
Junior Member
 
Join Date: Aug 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
jennifer_2008 is on a distinguished road
Re: QTP - windows 'File Save' Dialog not visible

Hi ,

Its not that I want to check if this Dialog exists.The problem is that this DIALOG is not coming up at all when I run the recorded script.

Have observed another thing.Please see attached image.
While recording this application,after I get the "FileDownload" dialog ,and If i move this dialog I could see the other "
Dialog("0% of dms.php from http://www.orange-")" just behind it....


Code:

Browser("Personalized Start Page").Page("Orange Shareserve 3.6").Frame("mainFrame_4").Link("address.csv").Click
Browser("Personalized Start Page").Page("Orange Shareserve 3.6").Sync
wait(2)
Dialog("0% of dms.php from www.orange-").Dialog("File Download").WinButton("Save").Click

Have observed another thing.Please see attached image.
While recording this application,after I get the "FileDownload" dialog ,and If i move this dialog I could see the other "
Dialog("0% of dms.php from http://www.orange-")" just behind it..

This is the dialog (Dialog("0% of dms.php from http://www.orange-")) ,that QTP says,its not finding.

Could that be the problem....

Waiting for your Reply

Thanks
J
Attached Images
File Type: jpg Dialog.jpg (44.6 KB, 4 views)
Reply With Quote
  #4 (permalink)  
Old 03-17-2009
Junior Member
 
Join Date: Aug 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
jennifer_2008 is on a distinguished road
Re: QTP - windows 'File Save' Dialog not visible

Thank you for your time NawabShaikh.
Eventually the dialog was visible when I added additional properties to the dialog like title,Name etc...
Reply With Quote
  #5 (permalink)  
Old 03-17-2009
Expert Member
 
Join Date: Apr 2008
Location: Tamilnadu
Posts: 1,461
Thanks: 15
Thanked 150 Times in 141 Posts
deepasree has a spectacular aura aboutdeepasree has a spectacular aura about
Re: QTP - windows 'File Save' Dialog not visible

hai jennifer,

Are you sure this line of script is generated in expert view while recording."Dialog("0% of dms.php from XYZ-").Dialog("File Download").WinButton("Save").Click"

There are two dialog boxes with different name. I think the problem is in this line and QTP fails to identify it.

In my application when i record the File Download and in expert view generates the following code as follows
Browser(B).Dialog(File Download).WinButton("Open").Click

Please make sure the line of code related to dialog which you have pasted and let me know.

Thanks
Deepasree
Reply With Quote
  #6 (permalink)  
Old 03-29-2009
Expert Member
 
Join Date: Sep 2007
Location: Hyderabad
Posts: 115
Thanks: 1
Thanked 19 Times in 15 Posts
rajaputra is on a distinguished road
Re: QTP - windows 'File Save' Dialog not visible

Hi
U can use only below line of code to click on save button

Dialog("File Download").Activate
Dialog("File Download").WinButton("Save").Click
__________________
__________________

Thanks & Regards!!
RAJAPUTRA
www.makeqtpeasy.blogspot.com
http://rajaputra.spaces.live.com/
Reply With Quote
  #7 (permalink)  
Old 03-30-2009
Expert Member
 
Join Date: Apr 2008
Location: Tamilnadu
Posts: 1,461
Thanks: 15
Thanked 150 Times in 141 Posts
deepasree has a spectacular aura aboutdeepasree has a spectacular aura about
Re: QTP - windows 'File Save' Dialog not visible

hi raj,

This your answer would be apt for file download dialog but please view the requirement of jenni she has two dialogs. If she uses the code given above it will not work. She should add ordinal properties for each dialog else it won't work.

Thanks
Deepasree
Reply With Quote
  #8 (permalink)  
Old 03-30-2009
Expert Member
 
Join Date: Sep 2007
Location: Hyderabad
Posts: 115
Thanks: 1
Thanked 19 Times in 15 Posts
rajaputra is on a distinguished road
Re: QTP - windows 'File Save' Dialog not visible

No Deepa,

According to Attached Screen shot,
if we use the above code, i am sure, it will work.


Ex: -

Dialog("File Download").Activate
Dialog("File Download").WinButton("Save").Click

Lets get update from jennifer...
__________________
__________________

Thanks & Regards!!
RAJAPUTRA
www.makeqtpeasy.blogspot.com
http://rajaputra.spaces.live.com/
Reply With Quote
  #9 (permalink)  
Old 03-31-2009
Expert Member
 
Join Date: Apr 2008
Location: Tamilnadu
Posts: 1,461
Thanks: 15
Thanked 150 Times in 141 Posts
deepasree has a spectacular aura aboutdeepasree has a spectacular aura about
Re: QTP - windows 'File Save' Dialog not visible

hai raj,

Please don't think i am arguing with you. I too faced the same scenario while automation and by adding ordinal properties to the dialog. The automation was successful. That's why i said by adding ordinal properties she can identify the dialog.

As you said lets wait for Jenni's update.

Thanks
Deepasree
Reply With Quote
  #10 (permalink)  
Old 2 Weeks Ago
Junior Member
 
Join Date: Nov 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
erpawan is on a distinguished road
Unhappy Re: QTP - windows 'File Save' Dialog not visible

Hi All,

I am having the same problem, I am able to click on save button, a window comes with progress bar. Now I want that QTP will wait until the file get download. the name of dialog is not same, so I can not use Dialog("").Exist.
Name of Dialog is same as J specified in last line as Dialog("1% of File Name") Plz suggest how I can handle it. I have to downlaod more than 1000 doc. for each doc the name of dialog box is different.

Thanks in Advance
Reply With Quote
  #11 (permalink)  
Old 1 Week Ago
Expert Member
 
Join Date: Sep 2007
Location: Hyderabad
Posts: 115
Thanks: 1
Thanked 19 Times in 15 Posts
rajaputra is on a distinguished road
Re: QTP - windows 'File Save' Dialog not visible

Use regular expression if the file extension is same for all 100 files.
EX-

Dialog(*.txt).Activate
Dialog(*.txt).Winbutton("OK).click
__________________
__________________

Thanks & Regards!!
RAJAPUTRA
www.makeqtpeasy.blogspot.com
http://rajaputra.spaces.live.com/
Reply With Quote
Reply

  Geeks Talk > Software Testing > QTP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
DP - How to capture text in dialog? learqtptesting QTP 3 02-25-2009 07:24 AM
shortcut of shoutdown dialog box sarathi trichy Windows 1 12-14-2007 02:13 PM
Finding PID of a file in Windows... psuresh1982 Unix/Linux 1 12-03-2007 05:14 AM
Save Excel file using JDBC into a database supari Java 1 08-30-2007 08:56 AM
In Impromptu, How can we get back the save dialog Geek_Guest Data Warehousing 0 07-06-2007 09:42 AM


All times are GMT -4. The time now is 04:50 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved