Skip to content

Commit

Permalink
[py] update execute_script and execute_async_script docstring for usages
Browse files Browse the repository at this point in the history
  • Loading branch information
lmtierney committed Dec 7, 2017
1 parent bb440e3 commit 01131b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions py/selenium/webdriver/remote/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ def execute_script(self, script, *args):
- \*args: Any applicable arguments for your JavaScript.
:Usage:
driver.execute_script('document.title')
driver.execute_script('return document.title;')
"""
converted_args = list(args)
command = None
Expand All @@ -634,7 +634,9 @@ def execute_async_script(self, script, *args):
- \*args: Any applicable arguments for your JavaScript.
:Usage:
driver.execute_async_script('document.title')
script = "var callback = arguments[arguments.length - 1]; " \
"window.setTimeout(function(){ callback('timeout') }, 3000);"
driver.execute_async_script(script)
"""
converted_args = list(args)
if self.w3c:
Expand Down

0 comments on commit 01131b2

Please sign in to comment.