BrowserIgnoreServerError Function

Action

Modifies the error severity of a specified server error for the subsequent browser-driven function call. This can be done for a specified amount of server errors or for all. Only errors causing Internet Explorer's web browser control to display an error page due to an error in navigation are handled.

Note: This function only works with Internet Explorer.

Include file

BrowserAPI.bdh

Syntax

BrowserIgnoreServerError( in nStatusCode : number,
                          in nSeverity   : number optional := SEVERITY_SUCCESS,
                          in nCount      : number optional );

Return value

  • none

Parameter Description
nStatusCode Server status code to ignore or change the severity for (e.g. 404).
nSeverity Optional: Severity of the error that is raised if the verification fails. Can be one of the following values:
  • SEVERITY_SUCCESS: (Default) Success; no error (numerical value: 0)
  • SEVERITY_INFORMATIONAL: Informational; no error (numerical value: 1)
  • SEVERITY_WARNING: Warning; no error (numerical value: 2)
  • SEVERITY_ERROR: Error; simulation continues (numerical value: 3)
  • SEVERITY_TRANS_EXIT: Error; the active transaction is aborted (numerical value: 4)
  • SEVERITY_PROCESS_EXIT: Error; the simulation is aborted (numerical value: 5)
nCount The specified error can occur nCount times before an error with the default severity is raised. If this parameter is omitted the specified severity is valid for all server responses

Example

benchmark SilkPerformerRecorder

use "BrowserAPI.bdh"

dcluser
  user
    VUser
  transactions
    TMain : 1;

dcltrans

  transaction TMain
  begin
    BrowserStart(BROWSER_MODE_DEFAULT, 800, 600);
    BrowserIgnoreServerError(404, SEVERITY_WARNING, 1);
    BrowserNavigate("http://demo.borland.com")
      
  end TMain;