Advertisement
Guest User

Untitled

a guest
May 6th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>Boletim</title>
  4. </head>
  5. <body>
  6. <form method="post" action="boletim.aspx" id="form1">
  7. <div class="aspNetHidden">
  8. <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value=""/>
  9. <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
  10. <input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="" />
  11. <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/MVzBQRB" />
  12. </div>
  13. <script type="text/javascript">
  14. //<![CDATA[
  15. var theForm = document.forms['form1'];
  16. if (!theForm) {
  17. theForm = document.form1;
  18. }
  19. function __doPostBack(eventTarget, eventArgument) {
  20. if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
  21. theForm.__EVENTTARGET.value = eventTarget;
  22. theForm.__EVENTARGUMENT.value = eventArgument;
  23. theForm.submit();
  24. }
  25. }
  26. //]]>
  27. </script>
  28. <script src="/fac/WebResource.axd?d=ywLVQ1&t=6353" type="text/javascript"></script>
  29. <div class="aspNetHidden">
  30. <input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="12310CFB" />
  31. <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEg73380Az+rg==" />
  32. </div>
  33. <div>
  34. <span id="WebReport1">
  35. <table width="100%" height="28" bgcolor="#ECE9D8" border="0">
  36. <tr height="19" valign="middle" align="center">
  37. <td width="125" align="left">
  38. <select name="WebReport1$ctl05" title="Export" style="font-family:Tahoma;font-size:8pt;">
  39. <option selected="selected" value="pdf">Adobe Acrobat</option>
  40. <option value="csv">CSV file</option>
  41. <option value="txt">Text File</option>
  42. </select>
  43. </td>
  44. <td width="16">
  45. <input type="image" name="WebReport1$ctl07" title="Export" src="/fac/WebResource.axd?d=-Yz4rC1&t=5312" />
  46. </td>
  47. </tr>
  48. </table>
  49. </span>
  50. </div>
  51. <script type=text/javascript>
  52. function frxOpenPrint(url){window.open(url, '_blank','resizable,scrollbars,width=700px,height=500px');};
  53. </script>
  54. </form>
  55. </body>
  56. </html>
  57.  
  58. // Select file type to download
  59. casper.then(function(){
  60. this.fillSelectors('form#form1', {
  61. 'select[name="WebReport1$ctl05"]' : "pdf"
  62. }, false);
  63. this.wait(1000,function(){
  64. this.echo("Select OK");
  65. });
  66. });
  67. // Download PDF file - not run
  68. casper.then(function(){
  69. this.click('input[type="image"][name="WebReport1$ctl07"]');
  70. this.page.onFileDownload = function(status){
  71. console.log('onFileDownload(' + status + ')');
  72. return "rl_boletim.pdf";
  73. };
  74. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement