Gary Poster wrote:

I have a form as follows:

<form action="aPythonScript"
      method="POST" name="form_name">
<input type="submit" name="action" value=" Go " />
<input type="submit" name="action" value=" Do Something " />

Now, I do the following with a zope.testbrowser.browser:

browser.getForm(name='form_name').getControl(' Do Something ').click()

However, the value of REQUEST.form['action'] in aPythonScript is " Go ", not " Do Something ", as I'd expect.

Any idea what's causing this and how I can fix it?

Unfortunately, not off-hand. If you send me a smallest-possible- failing doctest (which might be pretty close to this email?) I'll look at it and try to make it pass.

Well, I've just been thinking about how to do this, and then realised I have no idea how to write a form submit handler in Zope 3 and then how to weave that into a functional test.

How would I go about doing that?


Simplistix - Content Management, Zope & Python Consulting
Zope3-dev mailing list

Reply via email to