On 7/12/07, <b class="gmail_sendername">jeffrey mclurkin</b> <<a href="mailto:jeffrey.mclurkin@gmail.com">jeffrey.mclurkin@gmail.com</a>> 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't automatically save the file for you. If you "click" the file you want to save, then call "save_as" on it, passing in a string, it will save the file as the string you passed in. For example:
<br><br>page = agent.get('some_url')<br>file = page.click('some_link')<br>file.save_as('my_file.txt')<br></div><br></div><br>-- <br>Aaron Patterson<br><a href="http://tenderlovemaking.com/">http://tenderlovemaking.com/
</a>