Executes a JavaScript script asynchronously.
Namespace: OpenQA.Selenium.InternalAssembly: WebDriver (in WebDriver.dll) Version: 2.35.0.0 (2.35.0.0)
Syntax
Parameters
- script
- Type:
System String
The script to execute.
- args
- Type:
System Object
An array of objects used as arguments in the script.
Return Value
The object which is the return value of the script.Exceptions
Exception | Condition |
---|---|
![]() | if the object executing the function doesn't support JavaScript. |
OpenQA.Selenium WebDriverException | if the page reloads during the JavaScript execution. |
OpenQA.Selenium WebDriverTimeoutException | if the timeout expires during the JavaScript execution. |
See Also