0

I have an existing script that has been working fine for a long time and now it seems that the application's flow has changed.

Now the application displays a partially filled form(the filled fields are non-editable), I am required to fill in the missing values, click on continue and then click on continue again.

Now, loadrunner is not recording/registering the first click on the continue button and the second click actually submits the form.

I have tried various option including recording with Web(Click and Script) but that didn't work, tried clicking on the image/link (the first continue) and that didn't work.

Now i am not sure what to do next, hoping the experts here may be able to help.

...Code....

test_Funds()
{

lr_start_transaction("Login_test");

web_add_cookie("cust_xl=en; DOMAIN={test_Funds_2_p_env}");

web_add_cookie("login_date=2011-12-02%2001%3A43%3A36; DOMAIN={test_Funds_2_p_env}");

web_reg_find("Text=\r\n"
    "\t\t\r\n"
    "\t\t\t\r\n"
    "\t\t\t\r\n"
    "\t\t\t\tTest\r\n"
    "\t\t\t\r\n"
    "\t\t\r\n"
    "\t",
    LAST);

web_url("{test_Funds_2_p_env}",
    "URL=https://{test_Funds_2_p_env}/",
    "Resource=0",
    "RecContentType=text/html",
    "Referer=",
    "Snapshot=t1.inf",
    "Mode=HTML",
    EXTRARES,
        URLs....
    LAST);

lr_think_time(5);

web_submit_data("login",
    "Action=https://{test_Funds_2_p_env}/login",
    "Method=POST",
    "RecContentType=text/plain",
    "Referer=https://{test_Funds_2_p_env}/",
    "Snapshot=t2.inf",
    "Mode=HTML",
    ITEMDATA,
    "Name=action", "Value=login_user", ENDITEM,
    "Name=username", "Value={test_Funds_2_p_username}", ENDITEM,
    "Name=password", "Value={test_Funds_2_p_password}", ENDITEM,
    LAST);


lr_end_transaction("Login_test", LR_AUTO);


web_reg_find("Text=\r\n"
    "\t\t\r\n"
    "\t\t\t\r\n"
    "\t\t\t\r\n"
    "\t\t\t\ttest\r\n"
    "\t\t\t\r\n"
    "\t\t\r\n"
    "\t",
    LAST);

web_add_cookie("login_date=2011-12-02%2001%3A47%3A43; DOMAIN={test_Funds_2_p_env}");


web_url("{test_Funds_2_p_env}_2",
    "URL=https://{test_Funds_2_p_env}/",
    "Resource=0",
    "RecContentType=text/html",
    "Referer=",
    "Snapshot=t3.inf",
    "Mode=HTML",
    EXTRARES,
    urls...
    LAST);

web_reg_find("Text=Text",
    LAST);

lr_think_time(10);

web_reg_save_param_ex(
    "ParamName=p_uniqueid",
    "LB=\"unique_id\" value=\"",
    "RB=\">",
    SEARCH_FILTERS,
    LAST);

web_reg_save_param_ex(
    "ParamName=p_uid",
    "LB='uid', ",
    "RB=)",
    SEARCH_FILTERS,
    LAST);

lr_think_time(10);
web_reg_save_param_ex(
    "ParamName=cpm_id",
    "LB=\"cpm_id\" value=\"",
    "RB=\"",
    SEARCH_FILTERS,
    LAST);

lr_start_transaction("Clicking on Open link");

web_link("Open",
    "Text=Open",
    "Snapshot=t4.inf",
    EXTRARES,
    urls....
    LAST);


web_reg_find("Text=test",
    LAST);


lr_end_transaction("Clicking on Open link", LR_AUTO);


lr_start_transaction("Form_Submit");


web_submit_data("portal",
    "Action=https://{test_Funds_2_p_env}/test",
    "Method=POST",
    "RecContentType=text/html",
    "Referer=https://{test_Funds_2_p_env}/test?action=GoOpenChoose",
    "Snapshot=t5.inf",
    "Mode=HTML",
    ITEMDATA,
    "Name=txn_type", "Value=TWIN", ENDITEM,
    "Name=txn_type_source", "Value=", ENDITEM,
    "Name=cpm_id", "Value={cpm_id}", ENDITEM,
    "Name=cpm", "Value=test", ENDITEM,
    "Name=unique_id", "Value={p_uniqueid}", ENDITEM,
    "Name=vals_changed", "Value=1", ENDITEM,
    "Name=wtd_amount", "Value={test_Funds_2_p_wtd_amt}", ENDITEM,
    "Name=transit_no", "Value={test_Funds_2_p_transit_no}", ENDITEM,
    "Name=institution_no", "Value={test_Funds_2_p_inst_no}", ENDITEM,
    "Name=account_no", "Value={test_Funds_2_p_acct_no}", ENDITEM,
    "Name=confirm_account_no", "Value={test_Funds_2_p_confirm_acct_no}", ENDITEM,
    "Name=amount", "Value={test_Funds_2_p_wtd_amt}", ENDITEM,
    "Name=password", "Value={test_Funds_2_p_password}", ENDITEM,
    "Name=action", "Value=Dotest", ENDITEM,
    "Name=uid", "Value={p_uid}", ENDITEM,
    EXTRARES,
    urls....
    LAST);

lr_end_transaction("Form_Submit", LR_AUTO);

lr_free_parameter("p_uniqueid");
lr_free_parameter("p_uid");



lr_think_time(10);


lr_start_transaction("Logout_User");


web_link("FRANÇAIS",
    "Text=FRANÇAIS",
    "Snapshot=t6.inf",
    EXTRARES,
    URLs...
    LAST);


lr_end_transaction("Logout_test", LR_AUTO);

return 0; }

Abhishek Asthana
  • 1,857
  • 1
  • 31
  • 51

2 Answers2

0

a) Does this involve a Captcha?

b) Have you tried URL mode or web_custom_request() for the parts which are problematic?

c) Once you can record, are you handling all of the dynamic data or is it related to autocorrelation rules? (I noticed some static data in the script which needed to be handled from a dynamic perspective)

James Pulley
  • 5,606
  • 1
  • 14
  • 14
0

I was able to resolve the problem, there is a code which when submitted along with the rest of the data will submit the form without asking for a confirmation.

I found this code in the previous web page for some reason this code was not being captured while recording. I found the code, correlated it and now when I submit the request it goes through with any problems.

Abhishek Asthana
  • 1,857
  • 1
  • 31
  • 51