Displaying 1 result from an estimated 1 matches for "_editedtext".
2006 Oct 11
2
Mechanize: save and cancel doesn''t work in JSPWiki
...et any errors. There is no JavaScript
used to submit the form.
After I''m logged in I do the following:
def save(page, content)
@agent.get(@base_url + "Edit.jsp?page=#{page}")
form = @agent.page.forms.with.name(''editForm'')
form.fields.name(''_editedtext'').value = content
form.submit(form.buttons.first)
end
And this is the cancel method (the @agent already got the edit page)
def cancel
form = @agent.page.forms.with.name(''editForm'')
form.submit(form.buttons.name(''cancel''))
end
Michele
NOTE...