From: Joel Pearson Date: 2013-05-07T17:14:57+09:00 Subject: Re: Downloading a CSV using URI - mechanize Obviously I can't test your code under the same conditions, but from the look of it you should get the same file if you do this manually. The main thing which looks like it could go wrong is the checkbox section. allChkBoxes = checkboxForm.checkboxes chkNames = [] # <= This is overwritten as a String each time allChkBoxes.each do |chkBx| chkNames = chkBx.name # Why not just do "chkBx.check" ? checkboxForm.checkbox_with(:name => "#{chkNames}").check end I think you're doing something differently with the options when running this manually. Unless there's more than one link called CSV on the page? -- Posted via http://www.ruby-forum.com/.