[Erp5-report] r45995 arnaud.fontaine - /erp5/trunk/utils/erp5.utils.test_browser/src/erp5/u...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Aug 18 08:26:12 CEST 2011


Author: arnaud.fontaine
Date: Thu Aug 18 08:26:12 2011
New Revision: 45995

URL: http://svn.erp5.org?rev=45995&view=rev
Log:
Allow to get the information_area message.

Modified:
    erp5/trunk/utils/erp5.utils.test_browser/src/erp5/utils/test_browser/browser.py

Modified: erp5/trunk/utils/erp5.utils.test_browser/src/erp5/utils/test_browser/browser.py
URL: http://svn.erp5.org/erp5/trunk/utils/erp5.utils.test_browser/src/erp5/utils/test_browser/browser.py?rev=45995&r1=45994&r2=45995&view=diff
==============================================================================
--- erp5/trunk/utils/erp5.utils.test_browser/src/erp5/utils/test_browser/browser.py [utf8] (original)
+++ erp5/trunk/utils/erp5.utils.test_browser/src/erp5/utils/test_browser/browser.py [utf8] Thu Aug 18 08:26:12 2011
@@ -378,7 +378,7 @@ class Browser(ExtendedTestBrowser):
 
   def getTransitionMessage(self):
     """
-    Parses the current page and returns the value of the portal_status
+    Parse the current page and returns the value of the portal_status
     message.
 
     @return: The transition message
@@ -391,6 +391,21 @@ class Browser(ExtendedTestBrowser):
     except IndexError:
       raise LookupError("Cannot find div with ID 'transition_message'")
 
+  def getInformationArea(self):
+    """
+    Parse the current page and returns the value of the information_area
+    message.
+
+    @return: The information area message
+    @rtype: str
+
+    @raise LookupError: Not found
+    """
+    try:
+      return self.etree.xpath('//div[@id="information_area"]')[0].text
+    except IndexError:
+      raise LookupError("Cannot find div with ID 'information_area'")
+
   _listbox_table_xpath_str = '//table[contains(@class, "listbox-table")]'
 
   _legacy_listbox_table_xpath_str = '//div[contains(@class, "listbox")]'\



More information about the Erp5-report mailing list