An NDoc Documented Class Library

DefaultSelenium.AddScript Method 

Loads script content into a new script tag in the Selenium document. This differs from the runScript command in that runScript adds the script tag to the document of the AUT, not the Selenium document. The following entities in the script content are replaced by the characters they represent: < > & The corresponding remove command is removeScript.

public void AddScript(
   string scriptContent,
   string scriptTagId
);

Parameters

scriptContent
the Javascript content of the script to add
scriptTagId
(optional) the id of the new script tag. If specified, and an element with this id already exists, this operation will fail.

Implements

ISelenium.AddScript

See Also

DefaultSelenium Class | Selenium Namespace