BrowserGetUrl Function

Action

Retrieves the current URL from the browser.

Include file

BrowserAPI.bdh

Syntax

BrowserGetUrl( sUrl : out string ): boolean;
Parameter Description
sUrl The URL output parameter.

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
    url : string;
  begin
    BrowserStart(BROWSER_MODE_DEFAULT, 800, 600);
    BrowserNavigate("http://demo.borland.com/");
    
    // get the url of the current browser-window and print it
    BrowserGetUrl(url);
    print(url);
  end TMain;