I have a Windows Form that I gave a WebBrowser Control, I need to download an XML file, but the download button generates the URI on the fly with JavaScript so I can't reference the URL/URI that holds the XML with a line of code. So what I have done was grabbed the element by its ID and then invoked the Button "click". That is no good because I need to know the name of the XML file that I download and Know where it is going, so I can reference the file and parse through it.
Here is the HTML of the button:
<button type="button" id="__button35" data-sap-ui="__button35"
role="button" aria-disabled="false" tabindex="0"
class="HB-14-1E3F57 extTextLinkDark sapUiBtn sapUiBtnIconAndText
sapUiBtnNorm sapUiBtnS whiteToolPopupListLink sapUiBtnStd"><img
id="__button35-img" src="costco/resource/image/xmlIcon.png"
alt="" role="presentation" class="sapUiBtnIco sapUiBtnIcoL"><span
class="sapUiBtnTxt">Download Details as XML</span></button>
And here is a simple way of clicking on the button:
var buttonElement = webBrowser1.Document.GetElementById("__button35");
buttonElement.InvokeMember("click");
Can someone please help me find a way to to send this to a folder of my choosing, give the xml file a different name, or even a way of catching it as it downloads so I can parse the data? Thank you.