Commit a256ed95 authored by Arnaud Fontaine's avatar Arnaud Fontaine

No need to define our own counter before expiring Form instance as it's

already available in zope.testbrowser



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@46029 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d7f0e54d
......@@ -158,7 +158,6 @@ class Browser(ExtendedTestBrowser):
"""
# Meaningful to re-create the MainForm class every time the page
# has been changed
self._main_form_counter = -1
self._main_form = None
assert base_url[-1] == '/'
......@@ -259,11 +258,9 @@ class Browser(ExtendedTestBrowser):
"""
# If the page has not changed, no need to re-create a class, so
# just return the main_form instance
if self._main_form_counter == self._counter and self._main_form:
if self._main_form and self._counter == self._main_form._browser_counter:
return self._main_form
self._main_form_counter = self._counter
main_form = None
for form in self.mech_browser.forms():
if form.attrs.get('id') == 'main_form':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment