WebDriverExecuteScript Method
Execute a piece of JavaScript in the context of the currently selected frame or window

Namespace: Selenium
Assembly: Selenium (in Selenium.dll) Version: 2.0.9.0 (2.0.9.0)
Syntax
VB Usage
Dim 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: Object
The value specified by the return statement.
Examples
VB
txt = driver.ExecuteScript("return 'xyz' + arguments[0];", "123")
See Also