BrowserStop Function

Action

This function is used to close the browser of a virtual user.

Note: If you only want to restart the browser, consider using BrowserReset or BrowserStart.

Include file

BrowserAPI.bdh

Syntax

BrowserStop(): boolean;

Return value

  • true if successful

  • false otherwise

Example

benchmark SilkPerformerRecorder

use "Kernel.bdh"
use "BrowserAPI.bdh"

dcluser
  user
    VUser
  transactions
    TInit           : begin;
    TMain           : 1;

var

dclrand

dcltrans
  transaction TInit
  begin
  end TInit;

  transaction TMain
  begin
    BrowserStart(BROWSER_MODE_DEFAULT, 800, 600);
    BrowserNavigate("http://demo.borland.com/TestSite/gwt/Showcase.html#CwCheckBox");
      
    // check Monday
    BrowserCheckBoxSelect("//SPAN[@hideFocus='0']/INPUT[@hideFocus='0']", CHECKBOX_CHECKED);
    // uncheck Monday
    BrowserCheckBoxSelect("//SPAN[@hideFocus='0'][1]/INPUT[@hideFocus='0']", CHECKBOX_UNCHECKED);
    // check Tuesday
    BrowserCheckBoxSelect("//SPAN[@hideFocus='0'][2]/INPUT[@hideFocus='0']", CHECKBOX_CHECKED);

    BrowserStop();
  end TMain;