@@ -363,6 +363,15 @@ def run_keyword(self, name, args, kwargs):
363363 raise
364364
365365 def register_driver (self , driver , alias ):
366+ """Add's a `driver` to the library WebDriverCache.
367+
368+ :param driver: Instance of the Selenium `WebDriver`.
369+ :type driver: selenium.webdriver.remote.webdriver.WebDriver
370+ :param alias: Alias given for this `WebDriver` instance.
371+ :type alias: str
372+ :return: The index of the `WebDriver` instance.
373+ :rtype: int
374+ """
366375 return self ._drivers .register (driver , alias )
367376
368377 def failure_occurred (self ):
@@ -402,26 +411,31 @@ def browser(self):
402411 return self .driver
403412
404413 def find_element (self , locator , parent = None ):
405- """Find element matching ``locator``.
406-
407- This method and :meth:`find_elements` form the recommended
408- public API for external tools to get elements via SeleniumLibrary.
414+ """Find element matching `locator`.
409415
410416 :param locator: Locator to use when searching the element.
411417 See library documentation for the supported locator syntax.
412- :param parent: Optional parent ``WebElememt`` to search child elements
413- from. By default search starts from the root using ``WebDriver``.
418+ :type locator: str or selenium.webdriver.remote.webelement.WebElement
419+ :param parent: Optional parent `WebElememt` to search child elements
420+ from. By default search starts from the root using `WebDriver`.
421+ :type parent: selenium.webdriver.remote.webelement.WebElement
422+ :return: Found `WebElement`.
414423 :rtype: selenium.webdriver.remote.webelement.WebElement
415424 :raises SeleniumLibrary.errors.ElementNotFound: If element not found.
416425 """
417426 return self ._element_finder .find (locator , parent = parent )
418427
419428 def find_elements (self , locator , parent = None ):
420- """Find all elements matching `` locator` `.
429+ """Find all elements matching `locator`.
421430
422- Returns a list of ``WebElement`` objects. If no matching elements
423- are found, the list is empty. Otherwise semantics are exactly same
424- as with the :meth:`find_element` method.
431+ :param locator: Locator to use when searching the element.
432+ See library documentation for the supported locator syntax.
433+ :type locator: str or selenium.webdriver.remote.webelement.WebElement
434+ :param parent: Optional parent `WebElememt` to search child elements
435+ from. By default search starts from the root using `WebDriver`.
436+ :type parent: selenium.webdriver.remote.webelement.WebElement
437+ :return: list of found `WebElement` or e,mpty if elements are not found.
438+ :rtype: list[selenium.webdriver.remote.webelement.WebElement]
425439 """
426440 return self ._element_finder .find (locator , first_only = False ,
427441 required = False , parent = parent )
@@ -430,7 +444,7 @@ def find_elements(self, locator, parent=None):
430444 def _cache (self ):
431445 warnings .warn ('"SeleniumLibrary._cache" is deprecated, '
432446 'use public API instead.' , DeprecationWarning )
433- return self ._browsers
447+ return self ._drivers
434448
435449 def _current_browser (self ):
436450 warnings .warn ('"SeleniumLibrary._current_browser" is deprecated, '
0 commit comments