Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
To save pdf from QTP
#1
Not Solved
Hi

In my application i have a scenario to save a pdf to my local machine from application when these pdf's are available in different kind of reports whereas for 2 reports pdf name is same i am automating this scenario to save a pdf to local machine later verifying the pdf manually.The problem now is when i am running my script for other report which has the same pdf name i get the error file is already there in this location do you want to replace?.How i can handle this?.Is there anything to save a file under particular location.

I have done something like this:


Code:
dialogname="File Download"
    
Set o = Browser("").Dialog("text:="&dialogname)
    If o.Exist Then
        Report Environment("fname"),  "check", "dialog" & dialogname & " was found"
        o.Winbutton("text:=&Save").click
        Dialog("text:=File Download").Dialog("text:=Save As").Winbutton("text:=&Save").Click
    Else
        msg = "dialog " & dialogname & " doesn't exist"
        ReportMessage reportName, msg, micFail
        Exit Function
    End If
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Not able to click the save button in Save As window while downloading from SAP kathirvelnagaraj 0 2,479 08-25-2015, 07:37 PM
Last Post: kathirvelnagaraj
Rolleyes QTP 11 not identify PDF Browser laxminaranaya 1 2,423 02-25-2014, 01:34 PM
Last Post: guin.anirban
Sad Save data from pdf file to a word doc Amar 0 2,669 12-12-2013, 12:29 PM
Last Post: Amar
  Can we save an exported Excel sheet directly from QTP? Akhila 2 3,491 11-28-2013, 10:30 AM
Last Post: Akhila
  Save File1.xls as Text File1.txt with save as type - Text(Tab Delimited) Rupesh Singh 0 2,507 03-13-2013, 09:54 AM
Last Post: Rupesh Singh

Forum Jump:


Users browsing this thread: 1 Guest(s)