Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby Mechanize,填写表单后将html另存为文件_Ruby_Mechanize - Fatal编程技术网

Ruby Mechanize,填写表单后将html另存为文件

Ruby Mechanize,填写表单后将html另存为文件,ruby,mechanize,Ruby,Mechanize,我想在填写表单后保存html。让我们说: page.form.field.value = 'testing' page.save 'test.html' 生成的test.html文件没有modified value属性 <input name='something' value=''> 我期待着: <input name='something' value='testing'> 您想使用dom函数来实现: page.at('[name=something]'

我想在填写表单后保存html。让我们说:

page.form.field.value = 'testing'
page.save 'test.html'
生成的test.html文件没有modified value属性

 <input name='something' value=''>

我期待着:

 <input name='something' value='testing'>

您想使用dom函数来实现:

page.at('[name=something]')['value'] = 'testing'
换句话说,没有理由期望表单字段的更改会更新dom