BrowserSetIEMode Function

Action

Sets the IE compatibility mode for the browser-driven Web load testing feature. This API call has to be called before the BrowserStart function when browser applications are starting. Because this is a global setting, all running instances are affected when started depending on the current value.
Note: This function only works if Compatibility View is disabled in Internet Explorer. To disable Compatibility View in Internet Explorer 9, choose Tools > Compatibility View settings and uncheck the Display intranet sites in Compatibility View check box.

Include file

BrowserAPI.bdh

Syntax

BrowserSetIEMode( nMode : in number ): boolean;
Parameter Description
nMode The IE mode used for the browser-driven Web load testing feature. The following values may be used:
  • BROWSER_IE_DEFAULT := 0;
  • BROWSER_IE7_MODE := 7000;
  • BROWSER_IE8_MODE := 8000;
  • BROWSER_IE8_REGARDLESS_OF_DOCTYPE := 8888;
  • BROWSER_IE9_MODE := 9000;
  • BROWSER_IE9_REGARDLESS_OF_DOCTYPE := 9999;
  • BROWSER_IE10_MODE := 10000;
  • BROWSER_IE10_REGARDLESS_OF_DOCTYPE := 10001;
  • BROWSER_IE11_MODE := 11000;
  • BROWSER_IE11_REGARDLESS_OF_DOCTYPE := 11001;

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
  var
    ieMode : number;
  begin
    BrowserSetIEMode(BROWSER_IE7_MODE);
    BrowserStart(BROWSER_MODE_DEFAULT, 800, 600);
    
    // retrieve the IE mode and store it into a variable (ieMode)
    ieMode:= BrowserGetIEMode();    
    // print out the ieMode
    print(string(ieMode));
  end TMain;