An NDoc Documented Class Library |

# DefaultSelenium.RunScript Method

Creates a new "script" tag in the body of the current test window, and adds the specified text into the body of the command. Scripts run in this way can often be debugged more easily than scripts executed using Selenium's "getEval" command. Beware that JS exceptions thrown in these script tags aren't managed by Selenium, so you should probably wrap your script in try/catch blocks if there is any chance that the script will throw an exception.

public void RunScript(
string script
);

#### Parameters

script
  the JavaScript snippet to run

#### Implements

ISelenium.RunScript

#### See Also

DefaultSelenium Class | Selenium Namespace