Skip to content

Commit

Permalink
[py] Add docstring to WebElement find_element and find_elements metho…
Browse files Browse the repository at this point in the history
…ds (#5384)
  • Loading branch information
mkvetko authored and lmtierney committed Feb 2, 2018
1 parent 63d571a commit ec681f2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions py/selenium/webdriver/remote/webelement.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,14 @@ def _execute(self, command, params=None):
return self._parent.execute(command, params)

def find_element(self, by=By.ID, value=None):
"""
'Private' method used by the find_element_by_* methods.
:Usage:
Use the corresponding find_element_by_* instead of this.
:rtype: WebElement
"""
if self._w3c:
if by == By.ID:
by = By.CSS_SELECTOR
Expand All @@ -645,6 +653,14 @@ def find_element(self, by=By.ID, value=None):
{"using": by, "value": value})['value']

def find_elements(self, by=By.ID, value=None):
"""
'Private' method used by the find_elements_by_* methods.
:Usage:
Use the corresponding find_elements_by_* instead of this.
:rtype: list of WebElement
"""
if self._w3c:
if by == By.ID:
by = By.CSS_SELECTOR
Expand Down

0 comments on commit ec681f2

Please sign in to comment.