public ExecuteScript ( string script ) : object | ||
script | string | The JavaScript code to execute. |
return | object |
The ExecuteScriptmethod executes JavaScript in the context of the currently selected frame or window. This means that "document" will refer to the current document. If the script has a return value, then the following steps will be taken:
Arguments must be a number (which will be converted to a System.Int64), a System.Boolean, a System.String or a IWebElement. An exception will be thrown if the arguments do not meet these criteria. The arguments will be made available to the JavaScript via the "arguments" magic variable, as if the function were called via "Function.apply"
public ExecuteScript ( string script ) : object | ||
script | string | The JavaScript code to execute. |
return | object |