Skip to content

Commit

Permalink
[py] update documentation for find_element methods to remove 'private…
Browse files Browse the repository at this point in the history
…' indication
  • Loading branch information
lmtierney committed May 12, 2018
1 parent 0e1b72d commit 2c2db8a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions py/selenium/webdriver/remote/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -933,10 +933,11 @@ def set_page_load_timeout(self, time_to_wait):

def find_element(self, by=By.ID, value=None):
"""
'Private' method used by the find_element_by_* methods.
Find an element given a By strategy and locator. Prefer the find_element_by_* methods when
possible.
:Usage:
Use the corresponding find_element_by_* instead of this.
element = driver.find_element(By.ID, 'foo')
:rtype: WebElement
"""
Expand All @@ -958,10 +959,11 @@ def find_element(self, by=By.ID, value=None):

def find_elements(self, by=By.ID, value=None):
"""
'Private' method used by the find_elements_by_* methods.
Find elements given a By strategy and locator. Prefer the find_elements_by_* methods when
possible.
:Usage:
Use the corresponding find_elements_by_* instead of this.
elements = driver.find_elements(By.CLASS_NAME, 'foo')
:rtype: list of WebElement
"""
Expand Down
10 changes: 6 additions & 4 deletions py/selenium/webdriver/remote/webelement.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,10 +629,11 @@ def _execute(self, command, params=None):

def find_element(self, by=By.ID, value=None):
"""
'Private' method used by the find_element_by_* methods.
Find an element given a By strategy and locator. Prefer the find_element_by_* methods when
possible.
:Usage:
Use the corresponding find_element_by_* instead of this.
element = element.find_element(By.ID, 'foo')
:rtype: WebElement
"""
Expand All @@ -654,10 +655,11 @@ def find_element(self, by=By.ID, value=None):

def find_elements(self, by=By.ID, value=None):
"""
'Private' method used by the find_elements_by_* methods.
Find elements given a By strategy and locator. Prefer the find_elements_by_* methods when
possible.
:Usage:
Use the corresponding find_elements_by_* instead of this.
element = element.find_elements(By.CLASS_NAME, 'foo')
:rtype: list of WebElement
"""
Expand Down

0 comments on commit 2c2db8a

Please sign in to comment.