[Erp5-report] r8416 - /erp5/trunk/utils/erp5mechanize/ERP5Mechanize.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jul 11 19:39:09 CEST 2006


Author: vincent
Date: Tue Jul 11 19:39:06 2006
New Revision: 8416

URL: http://svn.erp5.org?rev=8416&view=rev
Log:
Handle the case of div tags without class attribute.

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=8416&r1=8415&r2=8416&view=diff
==============================================================================
--- erp5/trunk/utils/erp5mechanize/ERP5Mechanize.py (original)
+++ erp5/trunk/utils/erp5mechanize/ERP5Mechanize.py Tue Jul 11 19:39:06 2006
@@ -284,7 +284,7 @@
 
   def doContextExchange(self):
     """
-      Execute 'new'.
+      Execute 'exchange'.
       Fails if it is not present in the context bar.
     """
     raise Exception, 'not implemented.'
@@ -292,7 +292,7 @@
 
   def doContextReport(self):
     """
-      Execute 'new'.
+      Execute 'report'.
       Fails if it is not present in the context bar.
     """
     raise Exception, 'not implemented.'
@@ -300,7 +300,7 @@
 
   def doContextConfigure(self):
     """
-      Execute 'new'.
+      Execute 'configure'.
       Fails if it is not present in the context bar.
     """
     raise Exception, 'not implemented.'
@@ -337,7 +337,7 @@
     from xml.dom.minidom import parseString
     document = parseString(self.getHtml().get_data())
     for element in document.getElementsByTagName('div'):
-      if element.attributes.get('class').value == u'ListContent': # Hardcoded class name
+      if element.attributes.get('class') is not None and element.attributes.get('class').value == u'ListContent': # XXX: Hardcoded class name
         return element
     return None
 
@@ -354,7 +354,7 @@
     if input.attributes.get('type').value.lower() != u'hidden' and not input.attributes.has_key(u'disabled'):
       input['value'] = value
 
-  def getListboxRow(self, column_number, value, strict=False):
+  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.
     """




More information about the Erp5-report mailing list