Commit 3e7dd5c8 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Reorganize the code for listboxes


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@44849 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 34d57d98
......@@ -291,6 +291,23 @@ class Browser(ExtendedTestBrowser):
args['nr'] = index
return ContextLink(self.mech_browser.find_link(**args), self)
def getTransitionMessage(self):
"""
Parses the current page and returns the value of the portal_status
message.
@return: The transition message
@rtype: str
@raise LookupError: Not found
"""
try:
return self.etree.xpath('//div[@id="transition_message"]')[0].text
except IndexError:
raise LookupError("Cannot find div with ID 'transition_message'")
_listbox_table_xpath_str = '//table[contains(@class, "listbox-table")]'
def getListboxLink(self, line_number, column_number, *args, **kwargs):
"""
Follow the link at the given position.
......@@ -314,23 +331,6 @@ class Browser(ExtendedTestBrowser):
return self.getContextLink(url=self.etree.xpath(xpath_str).get('href'),
*args, **kwargs)
def getTransitionMessage(self):
"""
Parses the current page and returns the value of the portal_status
message.
@return: The transition message
@rtype: str
@raise LookupError: Not found
"""
try:
return self.etree.xpath('//div[@id="transition_message"]')[0].text
except IndexError:
raise LookupError("Cannot find div with ID 'transition_message'")
_listbox_table_xpath_str = '//table[contains(@class, "listbox-table")]'
def getListboxPosition(self,
text,
column_number=None,
......
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