I need to navigate within a web based program in our company and download files. (pdf, zip, doc ) anything that may be stored under a specific part number on our system.
I am able to: Open the page, type in a login and password, navigate through to various pages, and locate the link to a file I want, and even click it programatically. But im stuck when the "File Download" popup comes up and asks if I want to "Open, Save or Cancel". This is where I need help.
I can't point to the link of the file because I wouldnt know its path (especially not at runtime), also the program runs javascript so I cant inspect the element manually and look at the address of the link. So I'm pretty sure I need to navigate to the link through the front end like I have been doing.
I've accomplised everthing so far by: 1) reading lots of posts on ni forums (thank you to the contributors of this forum!!) and ....
2) using: An ActiveX WebBrowser object, looking at "IWebBrowser2" methods, retriving the page document and elements using "IHTMLDocument2.All method". Poking around using IHTMLElementCollection and IHTMLElement methods. In IHTMLElement you can look at properties of page elements and once you find the one you want, you can use the "IHTMLElement.Click" event to click the link.
This is all grat now I have a popup box that asks me if i want to "Open, Save, or Cancel". So I need to figure out how to :
1) Click Save, programatically
2) Point the file to a path of my choosing.