Highlighted
Trusted Contributor.
Trusted Contributor.
467 views

Pop up Dilalog box is not getting invoked

Hi Friends

 

I have an issue where am able to record creation of an event without any issue. while creating the event we invoke pop up dialog boxes where we enter details and then the event gets over. All the event is captured and recording is done

 

But while replaying the script the pop up is not getting invoked and am getting the following error

Action.c(191): Error: ctrx_sync_on_window("RIB iTWO (EN)") failed. Server IP address = 192.168.21.180:1494. The window does not exist.
The window currently in focus: "RIB iTWO 2015"

 

Refer the script as below

 

Action()
{

    web_url("Nmrcl-CtxWeb", 
        "URL=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Resource=0", 
        "RecContentType=text/html", 
        "Referer=", 
        "Snapshot=t1.inf", 
        "Mode=HTML", 
        EXTRARES, 
        "Url=receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        "Url=custom/style.css", ENDITEM, 
        "Url=receiver/images/1x/folder_template_C13BB96DEBC9F30F.png", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        "Url=receiver/images/1x/CitrixReceiver_WebScreen_CBE548FB8FEE049E.png", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        "Url=receiver/images/common/ReceiverFullScreenBackground_46E559C0E6B5A27B.jpg", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        "Url=receiver/js/external/hammer.v2.0.2.min_5507D46265FF2372.js", ENDITEM, 
        "Url=receiver/js/external/velocity.min_51C6C258BB124409.js", ENDITEM, 
        "Url=receiver/js/external/slick.min_FEB62CC230E2BA2A.js", ENDITEM, 
        "Url=receiver/images/1x/actionSprite_531B7A6FF85CA98E.png", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        "Url=receiver/js/ctxs.core.min_1D6DC421BAD069AE.js", ENDITEM, 
        "Url=receiver/js/ctxs.webui.min_DE392E359134A54E.js", ENDITEM, 
        "Url=receiver/js/external/jquery.dotdotdot.min_E12BB49CEDE48AB1.js", ENDITEM, 
        "Url=custom/script.js", ENDITEM, 
        "Url=custom/strings.en.js", ENDITEM, 
        "Url=receiver/images/1x/viewSprite_B2F322BDCB824FAF.png", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        "Url=receiver/images/common/authspinner_B0BCD339560CA593.gif", ENDITEM, 
        "Url=Resources/Icon/L0NpdHJpeC9ObXJjbC1DdHgvcmVzb3VyY2VzL3YyL2NuaERaM0IzUjFodVIxWXZiMDFOT1ZwYVVFb3hTbVZrWjFOM1BRLS0vaW1hZ2U-?size=128", ENDITEM, 
        "Url=Resources/Icon/L0NpdHJpeC9ObXJjbC1DdHgvcmVzb3VyY2VzL3YyL1dFY3dPREZXZURaSGF6bFZXVWxhUzFkUlRtdGtRMFJIYkVodlBRLS0vaW1hZ2U-?size=128", ENDITEM, 
        LAST);

    web_add_auto_header("X-Citrix-IsUsingHTTPS", 
        "No");

    web_add_auto_header("X-Requested-With", 
        "XMLHttpRequest");

/*Correlation comment - Do not change!  Original value='E45C4EE79DC593EE798A4C6A87B8CA11' Name ='CsrfToken' Type ='ResponseBased'*/
    web_reg_save_param_regexp(
        "ParamName=CsrfToken",
        "RegExp=CsrfToken=(.*?);",
        SEARCH_FILTERS,
        "Scope=Cookies",
        "IgnoreRedirections=No",
        LAST);

    web_custom_request("Configuration", 
        "URL=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/Home/Configuration", 
        "Method=POST", 
        "Resource=0", 
        "RecContentType=application/xml", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t2.inf", 
        "Mode=HTML", 
        "EncType=", 
        LAST);

    web_add_auto_header("Csrf-Token",
        "{CsrfToken}");

    web_custom_request("GetDetectionTicket", 
        "URL=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/ClientAssistant/GetDetectionTicket", 
        "Method=POST", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t3.inf", 
        "Mode=HTML", 
        "EncType=", 
        LAST);

    web_submit_data("GetDetectionStatus", 
        "Action=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/ClientAssistant/GetDetectionStatus", 
        "Method=POST", 
        "RecContentType=application/json", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t4.inf", 
        "Mode=HTML", 
        ITEMDATA, 
        "Name=ticket", "Value=CDT_MGi6hckSsm_DTEBaeKA8Wwln8ZJrA0XKEcbgnirfbmjylTQoiMZo34V8A6x80odx", ENDITEM, 
        LAST);

    web_add_cookie("CtxsUserPreferredClient=Native; DOMAIN=192.168.21.176");

    web_add_cookie("CtxsClientDetectionDone=true; DOMAIN=192.168.21.176");

    web_add_cookie("CtxsHasUpgradeBeenShown=true; DOMAIN=192.168.21.176");

    web_submit_data("List", 
        "Action=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/Resources/List", 
        "Method=POST", 
        "RecContentType=text/plain", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t5.inf", 
        "Mode=HTML", 
        ITEMDATA, 
        "Name=format", "Value=json", ENDITEM, 
        "Name=resourceDetails", "Value=Default", ENDITEM, 
        LAST);

    web_custom_request("GetAuthMethods", 
        "URL=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/Authentication/GetAuthMethods", 
        "Method=POST", 
        "Resource=0", 
        "RecContentType=application/xml", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t6.inf", 
        "Mode=HTML", 
        "EncType=", 
        LAST);

    web_custom_request("Login", 
        "URL=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/ExplicitAuth/Login", 
        "Method=POST", 
        "Resource=0", 
        "RecContentType=application/vnd.citrix.authenticateresponse-1+xml", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t7.inf", 
        "Mode=HTML", 
        "EncType=", 
        EXTRARES, 
        "Url=../receiver/images/1x/CitrixStoreFront_auth_14B96BFF2B0A6FF8.png", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        LAST);

    lr_save_string(lr_decrypt("59105c0848e3d509ba38d288"), "PasswordParameter");

    lr_think_time(5);

    web_submit_data("LoginAttempt", 
        "Action=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/ExplicitAuth/LoginAttempt", 
        "Method=POST", 
        "RecContentType=application/xml", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t8.inf", 
        "Mode=HTML", 
        ITEMDATA, 
        "Name=username", "Value=Ribuser", ENDITEM, 
        "Name=password", "Value={PasswordParameter}", ENDITEM, 
        "Name=saveCredentials", "Value=false", ENDITEM, 
        "Name=loginBtn", "Value=Log On", ENDITEM, 
        "Name=StateContext", "Value=", ENDITEM, 
        LAST);

    web_add_cookie("CtxsPasswordChangeAllowed=true; DOMAIN=192.168.21.176");

    web_submit_data("List_2", 
        "Action=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/Resources/List", 
        "Method=POST", 
        "RecContentType=application/json", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t9.inf", 
        "Mode=HTML", 
        ITEMDATA, 
        "Name=format", "Value=json", ENDITEM, 
        "Name=resourceDetails", "Value=Default", ENDITEM, 
        EXTRARES, 
        "Url=../receiver/images/1x/CitrixReceiverLogo_Home_5C24BCEC5A182425.png", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        "Url=../receiver/images/1x/ico_search_E84E3D63D821F80D.png", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        "Url=../receiver/images/1x/search_close_BC5A22358E58905F.png", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        "Url=../receiver/images/1x/img_favorites_empty_7FBE69CFC0FDDB2D.png", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        LAST);

    web_custom_request("GetUserName", 
        "URL=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/Authentication/GetUserName", 
        "Method=POST", 
        "Resource=0", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t10.inf", 
        "Mode=HTML", 
        "EncType=", 
        EXTRARES, 
        "Url=../receiver/images/1x/spinner_white_auth_button_53FD5A337A529DA7.gif", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        "Url=../receiver/images/1x/spinner_5CF0D1C8A76AAC8E.png", "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/receiver/css/ctxs.large-ui.min_77F67A01D0A24AF1.css", ENDITEM, 
        LAST);

    web_submit_data("Q29udHJvbGxlci5OTVJDTC1UZXN0", 
        "Action=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/Resources/GetLaunchStatus/Q29udHJvbGxlci5OTVJDTC1UZXN0", 
        "Method=POST", 
        "RecContentType=application/json", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t11.inf", 
        "Mode=HTML", 
        ITEMDATA, 
        "Name=createFileFetchTicket", "Value=false", ENDITEM, 
        LAST);

    ctrx_nfuse_connect("http://192.168.21.176/Citrix/Nmrcl-CtxWeb/Resources/LaunchIca/Q29udHJvbGxlci5OTVJDTC1UZXN0.ica?CsrfToken={CsrfToken}&IsUsingHttps=No&launchId=1494244273173", CTRX_LAST);

    ctrx_wait_for_event("LOGON", CTRX_LAST);

    ctrx_sync_on_window("RIB iTWO (EN)", ACTIVATE, 0, 0, 801, 601, "snapshot1", CTRX_LAST);

    ctrx_mouse_click(597, 139, LEFT_BUTTON, 0, "RIB iTWO (EN)=snapshot2", CTRX_LAST);

    lr_think_time(7);

    ctrx_mouse_click(606, 135, LEFT_BUTTON, 0, "RIB iTWO (EN)=snapshot3", CTRX_LAST);

    ctrx_sync_on_window("Create New Project", ACTIVATE, 44, 7, 713, 588, "snapshot4", CTRX_LAST);

    ctrx_type("33312", "", CTRX_LAST);

    ctrx_mouse_click(196, 119, LEFT_BUTTON, 0, "Create New Project=snapshot5", CTRX_LAST);

    ctrx_type("pewest", "", CTRX_LAST);

    lr_think_time(5);

    ctrx_mouse_click(476, 555, LEFT_BUTTON, 0, "Create New Project=snapshot6", CTRX_LAST);

    ctrx_mouse_click(476, 555, LEFT_BUTTON, 0, "Create new Project - Data transfer=snapshot7", CTRX_LAST);

    ctrx_mouse_click(476, 555, LEFT_BUTTON, 0, "Create new Project - Settings=snapshot8", CTRX_LAST);

    lr_think_time(21);

    ctrx_sync_on_window("\\Projects\\LoadRunner Test Prj\\3332 V1 (Tender) - RIB iTWO 2015", ACTIVATE, -8, -8, 1377, 785, "snapshot9", CTRX_LAST);

    ctrx_mouse_click(1346, 17, LEFT_BUTTON, 0, "\\Projects\\LoadRunner Test Prj\\3332 V1 (Tender) - RIB iTWO 2015=snapshot10", CTRX_LAST);

    ctrx_logoff(CTRX_NORMAL_LOGOFF, CTRX_LAST);

    web_add_cookie("CtxsDesktopAutoLaunchDone=no; DOMAIN=192.168.21.176");

    web_custom_request("Disconnect", 
        "URL=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/Sessions/Disconnect", 
        "Method=POST", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t12.inf", 
        "Mode=HTML", 
        "EncType=", 
        LAST);

    web_custom_request("Logoff", 
        "URL=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/Authentication/Logoff", 
        "Method=POST", 
        "Resource=0", 
        "RecContentType=text/plain", 
        "Referer=http://192.168.21.176/Citrix/Nmrcl-CtxWeb/", 
        "Snapshot=t13.inf", 
        "Mode=HTML", 
        "EncType=", 
        LAST);

    return 0;
}

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.