1
I can’t click a button that generates an Excel report (then it opens that "File Download" button "Want to save? Open? Cancel? but this part is quiet, I think, if it’s not let me know and if you already have the solution...).
Problem is I tried several ways:
IE.Document.getElementById("download_token_value").removeAttribute("onClick") 'FAILED
IE.Document.getElementById("download_token_value").setAttribute "onClick", "return true" 'FAILED
IE.Document.getElementsByName("DownloadToken").Item.onclick 'FAILED
For Each Button In IE.Document.getElementsByTagName("DownloadToken") 'FAILED
Button.Click
Next
IE.Document.getElementById("download_token_value").submit 'FAILED
IE.Document.getElementById("download_token_value").Click 'FAILED
IE.Document.all("download_token_value").Click 'FAILED
IE.Document.getElementById("download_token_value").Click 'FAILED
IE.Document.getElementsByName("DownloadToken").Item.Click 'FAILED
None of those worked, and I changed the properties over and over like I said,:
</ul>
</div>
<form action="/RptManifestoStatus/Index" method="post"><input id="download_token_value" name="DownloadToken" type="hidden" value="" />
<div class ="toolbar">
<div class ="toolbarBorder">
<div class="toolbarItem">
<input class="btExportarExcel" src="/Content/images/pix.gif" style="vertical-align: bottom; border:0;" type="image" value="" />
</div>
</div>
</div>
<div class="boxContent">
<div id="tabs">
<ul>
Another observation, all the methods, using the "Click" work, the code runs, but... does not open the file download tab, as if it did not click the button, that is, it finds the object/button, just does not execute the script I think. It is the last step, practically for this macro, the process will be 100% automatic with this.