I posted this same question on another forum and I got no reply. So
I'm trying it here.
I’m new to Ruby. I’m looking for ways to submit web forms and save the
resulting web page in a pdf file.
So I go to
https://www.some-site.com (yes https); I click on a “start”
button and a new page with a form to fill is displayed; I fill in the
form using data from a csv file; I click on a button to submit the
form; a new confirmation page is displayed. I want to save this
confirmation page in a pdf file.
I want to do this in Windows using simple Ruby scripts (without AJAX
or RAILS or VB, etc.) Using just Ruby scripts, Watir and IE 6, I am
able to do the form submit and navigation. I have no problem reading
from csv and navigating the website. However, I can’t seem to find a
simple way to save the last page into a pdf file.
I tried using the IE “print” function (CTRL-P) but I can only get the
IE print dialog to come up; I don’t know how to supply the file name
for the pdf printer’s “save as” pop-up window. Maybe CTRL-P is not the
way to do this.
Any ideas?
Thanks.
brainless