On 7/12/07, <b class="gmail_sendername">jeffrey mclurkin</b> &lt;<a href="mailto:jeffrey.mclurkin@gmail.com">jeffrey.mclurkin@gmail.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
When I click a link to download a file, a pop up window comes up to save the file. Is there a way to enter a file name and click the submit button with mechanize?</blockquote><div><br>Mechanize normally won&#39;t automatically save the file for you.&nbsp; If you &quot;click&quot; the file you want to save, then call &quot;save_as&quot; on it, passing in a string, it will save the file as the string you passed in.&nbsp; For example:
<br><br>page = agent.get(&#39;some_url&#39;)<br>file = page.click(&#39;some_link&#39;)<br>file.save_as(&#39;my_file.txt&#39;)<br></div><br></div><br>-- <br>Aaron Patterson<br><a href="http://tenderlovemaking.com/">http://tenderlovemaking.com/
</a>