[Erp5-report] r8423 - /erp5/trunk/utils/erp5mechanize/ERP5Mechanize.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Jul 12 13:41:05 CEST 2006
Author: vincent
Date: Wed Jul 12 13:40:55 2006
New Revision: 8423
URL: http://svn.erp5.org?rev=8423&view=rev
Log:
Handle listbox links.
Modified:
erp5/trunk/utils/erp5mechanize/ERP5Mechanize.py
Modified: erp5/trunk/utils/erp5mechanize/ERP5Mechanize.py
URL: http://svn.erp5.org/erp5/trunk/utils/erp5mechanize/ERP5Mechanize.py?rev=8423&r1=8422&r2=8423&view=diff
==============================================================================
--- erp5/trunk/utils/erp5mechanize/ERP5Mechanize.py (original)
+++ erp5/trunk/utils/erp5mechanize/ERP5Mechanize.py Wed Jul 12 13:40:55 2006
@@ -353,7 +353,7 @@
def getListboxLine(self, column_number, value, strict=False):
"""
- Returns the number of the first line containing given text in given column, None if not found.
+ Returns the position number of the first line containing given text in given column, None if not found.
"""
line_list = self._getListbox().getElementsByTagName(u'tr')
for line_pos in xrange(len(line_list)):
@@ -364,7 +364,7 @@
def getListboxColumn(self, line_number, value, strict=False):
"""
- Returns the number of the first column containing given text at given line, None if not found.
+ Returns the position number of the first column containing given text at given line, None if not found.
"""
column_list = self._getListbox().getElementsByTagName(u'tr')[line_number].getElementsByTagName(u'td')
for cell_pos in xrange(len(column_list)):
@@ -372,6 +372,16 @@
if (child.nodeType == child.TEXT_NODE) and strict and (value == child.wholeText) or (value in child.wholeText):
return cell_pos
return None
+
+ def doListboxLink(self, line_number, column_number):
+ """
+ Execute the link at given position.
+
+ XXX: what if there is more than one link ?
+ """
+ return self.timeOpen(str(self._getListbox().getElementsByTagName(u'tr')[line_number]\
+ .getElementsByTagName(u'td')[column_number]\
+ .getElementsByTagName(u'a')[0].attributes[u'href'].value))
class TimeResult:
"""
More information about the Erp5-report
mailing list