execute_async_script
The command to execute async javascript into the browser.
Similar to the execute_script command, you can pass in any javascript string and *args. The main difference is that you can execute asynchronous javascript. For example, using callbacks.
Syntax
Usage
correct usage
incorrect usage
Arguments
javascript (str)
- The async javascript to execute*args (Any)
- A comma-separated list of arguments to pass into the javascript string
You can access the *args in the javascript by using arguments[0]
, arguments[1]
, etc.
Yields
Any - This will return whatever is in the
return statement
of your javascript.
If you do not include a return, then .execute_async_script()
will return None
Examples
Last updated