Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to save a .pdf file in a browser window in qtp
#1
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
Reply
#2
can you use shortcut keys on the page to save such as Ctrl+S??? If yes, try using sendkey/Type.

Regards,
Ankesh
Reply
#3
Try using Virtual object concept....will work.
Reply
#4
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.
Reply
#5
@ssvali ,

It is alwys better to post the code which u hv tried, the error and the screenshot of the application.

Regards,
Ankesh
Reply
#6
Here is the script and snapshot

Code:
Browser("").Page("").Frame("").Image("Refresh").highlight Browser("").Page("").Frame("").Image("Refresh").Click Browser("").Page("").Sync Set WshShell = CreateObject("WScript.Shell") Browser("").Page("").Frame("").highlight WshShell.SendKeys "%s"


Attached Files Image(s)
   
Reply
#7
Reply
#8
Thanks ankesh for the reply.

I can see the address but not in the below mention format.
It shows only "http://www.google.com/"
Reply
#9
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.
Reply
#10
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)
   
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Object doesn't support this property or method: 'window(...).window(...).winobject' senthil5683 1 4,151 07-04-2016, 07:08 PM
Last Post: venkatesh9032
  How to update CSV File and need to Save same CSV File kotaramamohana 1 4,030 10-24-2015, 08:40 AM
Last Post: tigerliew
  Not able to click the save button in Save As window while downloading from SAP kathirvelnagaraj 0 2,855 08-25-2015, 07:37 PM
Last Post: kathirvelnagaraj
  Cannot find the "[ WebEdit ]" object's parent "[ Browser ]" (class Browser). Verify t Divya Roopa 1 9,145 03-11-2014, 12:13 PM
Last Post: devarapallliramana
Rolleyes QTP 11 not identify PDF Browser laxminaranaya 1 2,860 02-25-2014, 01:34 PM
Last Post: guin.anirban

Forum Jump:


Users browsing this thread: 1 Guest(s)