Commit 01262d80 authored by Arnaud Fontaine's avatar Arnaud Fontaine

The first two lines of a listboxes contain only <th> column and not

only the first one


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@44850 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3e7dd5c8
......@@ -325,7 +325,7 @@ class Browser(ExtendedTestBrowser):
"""
xpath_str = '%s//tr[%d]//%s[%d]//a[0]' % (self._listbox_table_xpath_str,
line_number,
line_number == 1 and 'th' or 'td',
line_number <= 2 and 'th' or 'td',
column_number)
return self.getContextLink(url=self.etree.xpath(xpath_str).get('href'),
......@@ -356,7 +356,7 @@ class Browser(ExtendedTestBrowser):
# Require either column_number or line_number to be given
onlyOne([column_number, line_number], '"column_number" and "line_number"')
cell_type = line_number == 1 and 'th' or 'td'
cell_type = line_number <= 2 and 'th' or 'td'
if column_number:
column_or_line_xpath_str = '//tr//%s[%d]' % (cell_type, column_number)
......@@ -681,7 +681,7 @@ class ContextMainForm(MainForm):
"""
xpath_str = '%s//tr[%d]//%s[%d]/input' % (self.browser._listbox_table_xpath_str,
line_number,
(line_number == 1 and u'th' or u'td'),
(line_number <= 2 and u'th' or u'td'),
column_number)
input_element = self.browser.etree.xpath(xpath_str)[0]
......
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