C# code to 'Save As' an HTMl page containing PDF file

Hi,

I was looking for the code in C# where I am working on the automation of an application. My question is that, while the application is running it opens up a new 'Internet Explorer' window inside which it opens a PDF file.

Now I want to perform following things in this page using C# code:
1. 'Save As' the PDF file to any location.
2. Click on the different buttons available in this page like 'Print', 'send email', save.

Please if someone can provide the solution ASAP, it would be very helpful.

- Dev
dev_qasourceAsked:
Who is Participating?
 
jmelettCommented:
AutoIT allows you to access GUI components (e.g. a TextField) or HTML fields and manipulate them.

So, assuming that you enter a value into a TextField of a specific application (called "theSpecificApp"), an example code could look like this

WinActivate("theSpecificApp")
Send("{TAB}{TAB}{ENTER}") ;Use Tab/Right/Left Combinations to hit the button.. ooor
;MouseClick("left", 100, 200) ; Click with the left mouse on monitor position X Y (100 200)
WinWaitActive("Internet Explorer with pdf") ; Wait until the IE Window pops up

etc...

With AutoIt you can control Windows Form Elements, IE Objects and lots more. Check out the help file and you'll find everything needed.
0
 
DeathraceCommented:
How you're converting into PDF , are you using Adobe ActiveX Dll for this or any thirdparty .dll files.
0
 
dev_qasourceAuthor Commented:
We are not converting this into PDF, its actually the web application itself which opens a new pdf file in the new 'internet explorer' window.
0
 
jmelettCommented:
If you're trying to automate tasks, try a scripting language like http://www.autoitscript.com/autoit3/index.shtml. There is also a DLL/COM Control which you can add to your C# Applications.

(I've used AutoIt a few times to automate tasks for large financial companies).

Let me know if you need any further info.

Cheers
0
 
dev_qasourceAuthor Commented:
I have a question here, since I am using Visual Studio Team system 2008 team system integrated with WebAii design canvas tool (v1.1).

The Application I am automating is fills a form and then clicking on a button generates a PDF file in the internet explorer itself. Now how would i generate the code using this tool?

I am not able to get what this tool will do for me and how?


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.