WebDriverExecuteScript Method |
Execute a piece of JavaScript in the context of the currently selected frame or window
Namespace: SeleniumAssembly: Selenium (in Selenium.dll) Version: 2.0.9.0 (2.0.9.0)
SyntaxDim instance As WebDriver
Dim script As String
Dim arguments As Object
Dim returnValue As Object
returnValue = instance.ExecuteScript(script,
arguments)
Parameters
- script
- Type: SystemString
The JavaScript code to execute. - arguments (Optional)
- Type: SystemObject
The arguments to the script.
Return Value
Type:
ObjectThe value specified by the return statement.
Examplestxt = driver.ExecuteScript(, "123")
See Also