WebBrowserScript ClassC# API
Represents a Web C# Virtual User Script.
Inheritance Hierarchy

System Object
  Facilita.Fc.Runtime VirtualUserScript
    Facilita.Web WebBrowserScript
      Facilita.Fc.Citrix CitrixVirtualUserScript
      TestPlant.ASP_NET ASPNET_VirtualUserScript

Namespace: Facilita.Web
Assembly: clrWebBrowser (in clrWebBrowser.dll) Version: (

public abstract class WebBrowserScript : VirtualUserScript

When a test containing Web C# Virtual Users is run, a WebBrowserVirtualUser object is created by the eggPlant Performance engine for every Virtual User in the test. These WebBrowserVirtualUser objects runs scripts/workflows by creating instances of script classes (which are subclasses of this WebBrowserScript class) and calling the Script() method on them.

Whenever a Web C# Virtual User Script is created using eggPlant Performance Studio, either by recording a web trace and generating the script automatically or by creating a blank script, a template is used to fill in the basic structure of the script.

namespace com.testplant.testing
    public class MyNewWebCSScript : Facilita.Web.WebBrowserScript
        public override void Pre()
            // Put any code that needs to execute at the start of the test here

        public override void Script()
            // Place your iterated script code here.

The name you give your script in eggPlant Performance Studio will be used as the name of the class in the script file, and the class will be a subclass of WebBrowserScript. (If you have customised the Web C# Virtual User type as outlined in the description of the WebBrowserVirtualUser class, then the script class will be a subclass of the VU Script source class, which will be a subclass of WebBrowserScript.)

In eggPlant Performance Studio you can define a test which includes a Virtual User Group running your Web C# Virtual User Script (or a workflow containing your script). When the test is run in Test Controller, then code written in the Script() method will execute. The Script() method will be called a number of times, relating to the number of iterations that the VU Group is set to perform. This may be a fixed number per test, or a VU Group can be set to run continuously for a certain period of time.

See Also