Robot Framework SeleniumLibrary
SeleniumLibrary.keywords.runonfailure.RunOnFailureKeywords Class Reference
Inheritance diagram for SeleniumLibrary.keywords.runonfailure.RunOnFailureKeywords:
SeleniumLibrary.base.librarycomponent.LibraryComponent SeleniumLibrary.base.context.ContextAware

Public Member Functions

def register_keyword_to_run_on_failure (self, keyword)
 Sets the keyword to execute when a SeleniumLibrary keyword fails. More...
 
- Public Member Functions inherited from SeleniumLibrary.base.librarycomponent.LibraryComponent
def assert_page_contains (self, locator, tag=None, message=None, loglevel='TRACE')
 
def assert_page_not_contains (self, locator, tag=None, message=None, loglevel='TRACE')
 
def debug (self, msg, html=False)
 
def get_timeout (self, timeout=None)
 
def info (self, msg, html=False)
 
def log (self, msg, level='INFO', html=False)
 
def log_source (self, loglevel='INFO')
 
def warn (self, msg, html=False)
 
- Public Member Functions inherited from SeleniumLibrary.base.context.ContextAware
def __init__ (self, ctx)
 Base class exposing attributes from the common context. More...
 
def find_element (self, locator, tag=None, required=True, parent=None)
 Find element matching locator. More...
 
def find_elements (self, locator, tag=None, parent=None)
 Find all elements matching locator. More...
 
def is_element_enabled (self, locator, tag=None)
 
def is_text_present (self, text)
 
def is_visible (self, locator)
 

Static Public Member Functions

def resolve_keyword (name)
 

Additional Inherited Members

- Public Attributes inherited from SeleniumLibrary.base.context.ContextAware
 ctx
 
- Properties inherited from SeleniumLibrary.base.librarycomponent.LibraryComponent
 log_dir = property
 
- Properties inherited from SeleniumLibrary.base.context.ContextAware
 driver = property
 
 drivers = property
 
 element_finder = property
 

Detailed Description

Definition at line 21 of file runonfailure.py.

Member Function Documentation

◆ register_keyword_to_run_on_failure()

def SeleniumLibrary.keywords.runonfailure.RunOnFailureKeywords.register_keyword_to_run_on_failure (   self,
  keyword 
)

Sets the keyword to execute when a SeleniumLibrary keyword fails.

    ``keyword`` is the name of a keyword that will be executed if a
    SeleniumLibrary keyword fails. It is possible to use any available
    keyword, including user keywords or keywords from other libraries,
    but the keyword must not take any arguments.

    The initial keyword to use is set when `importing` the library, and
    the keyword that is used by default is `Capture Page Screenshot`.
    Taking a screenshot when something failed is a very useful
    feature, but notice that it can slow down the execution.

    It is possible to use string ``NOTHING`` or ``NONE``,
    case-insensitively, as well as Python ``None`` to disable this
    feature altogether.

    This keyword returns the name of the previously registered
    failure keyword or Python ``None`` if this functionality was
    previously disabled. The return value can be always used to
    restore the original value later.

    Example:
    | `Register Keyword To Run On Failure`  | Log Source |
    | ${previous kw}= | `Register Keyword To Run On Failure`  | NONE |
    | `Register Keyword To Run On Failure`  | ${previous kw} |

    Changes in SeleniumLibrary 3.0:
    - Possible to use string ``NONE`` or Python ``None`` to disable the
      functionality.
    - Return Python ``None`` when the functionality was disabled earlier.
      In previous versions special value ``No Keyword`` was returned and
      it could not be used to restore the original state.

Definition at line 57 of file runonfailure.py.

◆ resolve_keyword()

def SeleniumLibrary.keywords.runonfailure.RunOnFailureKeywords.resolve_keyword (   name)
static

Definition at line 65 of file runonfailure.py.


The documentation for this class was generated from the following file: