Posts: 121
Threads: 8
Joined: Apr 2012
Reputation:
2
09-12-2012, 06:37 PM
Hi,
I need help how to save PDF file using QTP. It is a web-based application.
The following are the steps i need to perform to get the PDF.
1. Select Data from WebList
2. Click Refersh
3. Application opens a PDF File in a browser itself
When i am try to capture SAVE button of PDF, it capture whole toolbar instead of only SAVE button.
When i record it, it says Browser().Page().Frame().WinObject().Click X,Y
Awaiting for the earliest replies.
Regards,
Shashavali
Posts: 424
Threads: 10
Joined: Aug 2011
Reputation:
0
09-12-2012, 07:13 PM
can you use shortcut keys on the page to save such as Ctrl+S??? If yes, try using sendkey/Type.
Regards,
Ankesh
Posts: 16
Threads: 2
Joined: Dec 2008
Reputation:
0
09-12-2012, 08:59 PM
Try using Virtual object concept....will work.
Posts: 121
Threads: 8
Joined: Apr 2012
Reputation:
2
09-13-2012, 12:00 PM
Thank you very much for ur replies...
@ Ankesh : - I tried using shortkeys "CTRL+S" , but it didn't worked.
@ freeboynil :- when i am trying to create Virtual Object, QTP throws an error "Failed to Create The Virtual Object Definition"
It will be helpful if you provide some detail about it.
Posts: 424
Threads: 10
Joined: Aug 2011
Reputation:
0
09-13-2012, 12:04 PM
@ssvali ,
It is alwys better to post the code which u hv tried, the error and the screenshot of the application.
Regards,
Ankesh
Posts: 121
Threads: 8
Joined: Apr 2012
Reputation:
2
09-13-2012, 03:14 PM
Thanks ankesh for the reply.
I can see the address but not in the below mention format.
It shows only "http://www.google.com/"
Posts: 424
Threads: 10
Joined: Aug 2011
Reputation:
0
09-13-2012, 03:18 PM
(This post was last modified: 09-13-2012, 03:25 PM by Ankesh .)
Not a problem.
just update the line this WinHttp.Open "GET", "http://google.com/your_pdf_file.pdf", False
with the address which you can see. Try this once.
WinHttp.Open "GET", "http://google.com", False
let me know the output.
Posts: 121
Threads: 8
Joined: Apr 2012
Reputation:
2
09-13-2012, 04:43 PM
Hi Ankesh,
Thanks again for the quick response. I changed script as per ur suggestion. File is saved to local drive but if i open it throws an error.
Attached is the screenshot of Error.
Regards,
ssvali
Attached Files
Image(s)