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

System Object
  Facilita.Fc.Runtime VirtualUser
    Facilita.Web WebBrowserVirtualUser
      Facilita.Fc.Citrix CitrixVirtualUser
      TestPlant.ASP_NET ASPNET_VirtualUser

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

public class WebBrowserVirtualUser : VirtualUser

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 your script classes (which are subclasses of WebBrowserScript) and calling the Script() method on them.

Each instance of WebBrowserVirtualUser has a separate WebBrowser object that can be used to send HTTP requests to a web server. This has two implications:

  • Each Virtual User has a different cache and WebBrowser settings
  • If a Virtual User is running a workflow containing multiple scripts, then changes to the Virtual User's WebBrowser object in one script will affect the other scripts too

The WebBrowser object can be accessed from within your Script() method using the WebBrowser property.

When developing Web scripts, it is recommended to customise the Web C# Virtual User type, by performing the following actions in eggPlant Performance Studio:

  • Under Workspace/Virtual Users, right-click Web C# Virtual User, and then click New VU Type
  • Type a name (which will be used as the class name) and a description
  • Expand the newly-created custom Virtual User type, and the Source folder
  • Edit the VU source file (the class which extends WebBrowserVirtualUser) by adding methods that can be called from any script which is based on your custom Virtual User, and/or overriding the methods in WebBrowserVirtualUser.

The other source file created for the custom Virtual User type is a VU Script source file, which is a class that extends WebBrowserScript and will be the base class of any script files you create with the custom Virtual User type.

See Also