You could use the Watir gem. The gem was originally intended to drive the IE browser, but would fit your need.
To see:
1) Install the Watir gem
2) Create a test.htm file with the following:
Give me a name<br>
<form name="myForm" title="myForm">
<input type="text" id="name" >
<input id="submit" type="button" value="OK" onclick='document.myForm.submit.value="Done"'>
</form>
3) Run the following watir script, which will open the browser to your form. After you input the name and click [OK], the name is outputted. Note that you may need to change the location of the file in the script depending on where you saved your test.htm:
require 'watir'
b = Watir::IE.new
begin
b.goto('file:///C:/Documents%20and%20Settings/Setup/Desktop/test.htm')
begin
sleep(5)
end until b.button(:id, 'submit').value != "OK"
name = b.text_field.value
ensure
b.close
end
puts name
I think this shows the general feasibility of doing what you want. Validation and dynamic creation of the forms would also be possible.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…