Extending SeleniumLibrary
Tatu Aalto, SeleniumLibrary lead developer
New architecture vision
New architecture: Public methods
find_element | Finds first element matching "locator". |
find_elements | Find all elements matching "locator. |
register_driver | Add a Selenium "driver" to the library WebDriverCache. |
run_keyword | Responsible for executing keywords. |
failure_occured | Executed when a SeleniumLibrary keyword fails. |
New architecture: Public attributes
Public API attributes:
driver | Current active Selenium driver in the library. |
timeout | Default value for "timeouts" used with "Wait ..."" keywords. |
implicit_wait | Default value for Selenium "implicit wait" used when locating elements. |
run_on_failure_keyword | Stores the keyword for the "run-on-failure functionality". |
screenshot_root_directory | Location where possible screenshots are created. |
New architecture: Context object
New architecture: base object
The end result
Extending the library
How to extend: Getting active instance
How to extend: Using multiple classes
How to extend: Extend SeleniumLibrary
Questions?