Revision: 3168
Author: KariHusa
Date: Wed May 5 02:47:38 2010
Log: New keyword run keyword and continue on failure, issue 545
http://code.google.com/p/robotframework/source/detail?r=3168
Modified:
/trunk/src/robot/libraries/BuiltIn.py
=======================================
--- /trunk/src/robot/libraries/BuiltIn.py Tue May 4 04:39:09 2010
+++ /trunk/src/robot/libraries/BuiltIn.py Wed May 5 02:47:38 2010
@@ -794,6 +794,17 @@
raise
return 'FAIL', unicode(err)
+ def run_keyword_and_continue_on_failure(self, name, *args):
+ """Runs the keyword and continues even if non-exitable errors
occurred.
+
+ The keyword name and arguments work as in `Run Keyword`. See
+ `Run Keyword If` for a usage example."""
+ try:
+ return self.run_keyword(name, *args)
+ except ExecutionFailed, err:
+ err.cont = True
+ raise err
+
def run_keyword_and_expect_error(self, expected_error, name, *args):
"""Runs the keyword and checks that the expected error occurred.