CitrixConnectIcaData Function

Action

Establishes a connection to a Citrix MetaFrame server, or server farm, using ICA file content provided in a string parameter. This is especially useful when an ICA file is downloaded via a Web function. This function is scripted automatically when recording an NFuse connection establishment.

Include file

CitrixAPI.bdh

Syntax

CitrixConnectIcaData( in sData : string ) : boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
sData Content of an ICA file.

Example:

benchmark KDTBenchmarkName

use "webAPI.bdh"
use "CitrixAPI.bdh"

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

var

dclrand

dcltrans
  transaction TInit
  begin
    WebSetBrowser(WEB_BROWSER_MSIE6);
    WebModifyHttpHeader("Accept-Language", "en-us");
    //WebSetUserBehavior(WEB_USERBEHAVIOR_FIRST_TIME);
    //WebSetDocumentCache(true, WEB_CACHE_CHECK_SESSION);
  end TInit;

  transaction TMain
  var
    gsICAData : string;
    hWnd5 : number;
  begin
    //Redirecting -> (redir) http://citserver/Citrix/MetaFrame/Citrix/NFuse151/ASP/login.htm
    WebPageUrl("http://citserver/", "Citrix NFuse");

    ThinkTime(4.9);
    WebPageSubmit("Login", LOGIN001, "applist_nfuse.asp"); // Form 1

    WebParseDataBoundEx(gsICAData);
    ThinkTime(4.0);
    WebPageLink("Excel", "launch.asp", 1, "nfusemain"); // Link 3
    CitrixInit(800, 600);
    CitrixConnectICAData(gsICAData);
    CitrixWaitForLogon();
    hWnd5 := CitrixWaitForWindowCreation("Microsoft Excel - Book1", MATCH_Exact,0x14CF0000, 11, 26, 643, 492);
    ThinkTime(3.17);
    CitrixMouseClick(627, 9, hWnd5, MOUSE_ButtonLeft);
    CitrixWaitForWindow(hWnd5, EVENT_Destroy);
    ThinkTime(2.73);
    CitrixDisconnect();
  end TMain;
    
dclform
  LOGIN001:
    "CTX_Application"           := "Citrix.MPS.App.LinzFarm.MSExcel",
    "CTX_Token"                 := "CFEDA5A27579A0CC59737833F192DAF9",
    "LaunchId"                  := "1380105291129";