'Selenium2Library can be imported with optional arguments.
`timeout` is the default timeout used to wait for all waiting actions.
It can be later set with `Set Selenium Timeout`.
\'implicit_wait\' is the implicit timeout that Selenium waits when
looking for elements.
It can be later set with `Set Selenium Implicit Wait`.
See `WebDriver: Advanced Usage`__ section of the SeleniumHQ documentation
for more information about WebDriver\'s implicit wait functionality.
__ http://seleniumhq.org/docs/04_webdriver_advanced.html#explicit-and-implicit-waits
`run_on_failure` specifies the name of a keyword (from any available
libraries) to execute when a Selenium2Library keyword fails. By default
`Capture Page Screenshot` will be used to take a screenshot of the current page.
Using the value "Nothing" will disable this feature altogether. See
`Register Keyword To Run On Failure` keyword for more information about this
functionality.
`screenshot_root_directory` specifies the default root directory that screenshots should be
stored in. If not provided the default directory will be where robotframework places its logfile.
Examples:
| Library `|` Selenium2Library `|` 15                                            | # Sets default timeout to 15 seconds                                       |
| Library `|` Selenium2Library `|` 0 `|` 5                                       | # Sets default timeout to 0 seconds and default implicit_wait to 5 seconds |
| Library `|` Selenium2Library `|` 5 `|` run_on_failure=Log Source               | # Sets default timeout to 5 seconds and runs `Log Source` on failure       |
| Library `|` Selenium2Library `|` implicit_wait=5 `|` run_on_failure=Log Source | # Sets default implicit_wait to 5 seconds and runs `Log Source` on failure |
| Library `|` Selenium2Library `|` timeout=10      `|` run_on_failure=Nothing    | # Sets default timeout to 10 seconds and does nothing on failure           |'

def __init__(self, timeout=5.0, implicit_wait=0.0, run_on_failure='Capture    Page    Screenshot', screenshot_root_directory=None):

    self._run_on_failure_keyword = None
    self._running_on_failure_routine = False
    self._speed_in_secs = 0.0
    self._timeout_in_secs = 5.0
    self._implicit_wait_in_secs = 5.0
    libraries = [AlertKeywords(self), BrowserManagementKeywords(self), RunOnFailureKeywords(self), ElementKeywords(self), TableElementKeywords(self), FormElementKeywords(self), SelectElementKeywords(self), JavaScriptKeywords(self), CookieKeywords(self), ScreenshotKeywords(self), WaitingKeywords(self)]
    self._browsers = BrowserCache()
    DynamicCore.__init__(self, libraries)
    self.screenshot_root_directory = screenshot_root_directory
    self.set_selenium_timeout(timeout)
    self.set_selenium_implicit_wait(implicit_wait)
    self.register_keyword_to_run_on_failure(run_on_failure)
    self.ROBOT_LIBRARY_LISTENER = LibraryListener()
    self.element_finder = ElementFinder(self)
