Highlighted
Absent Member.
Absent Member.
553 views

Web_URL - How to substitute run time value

Jump to solution

for (i = 1 ;i < Counts ; i++  )
    {

        lr_start_transaction("01_SelectNicknames");

        web_reg_find("Text={MyNickname}",
            LAST);

      

        web_url("SummaryDetail.aspx",
            "URL=http://www.mysite/checkout/summaryDetail.aspx?AcctId= i",
            "Resource=0",
            "RecContentType=text/html",
            "Referer=www.mysite/checkout/checkout.aspx",
            "Snapshot=t5.inf",
            "Mode=HTML",
            LAST);
   
  lr_end_transaction("01_SelectNicknames",LR_AUTO); 
   
 }
   
   Expected result
   During Run time, the value of i in the URL paramater should be substituted with number in the for loop, so it should be something like this in the first run
   
   http://www.mysite/checkout/summaryDetail.aspx?AcctId= 1
   
   But I do not know how to ( syntax) substitite the value

0 Likes
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Web_URL - How to substitute run time value

Jump to solution

You may try below.

 

lr_param_sprintf("URL", "URL=http://www.mysite/checkout/summaryDetail.aspx?AcctId=%d", i);

web_url("SummaryDetail.aspx",
            "{URL}",
            "Resource=0",
            "RecContentType=text/html",
            "Referer=www.mysite/checkout/checkout.aspx",
            "Snapshot=t5.inf",
            "Mode=HTML",
            LAST);

View solution in original post

0 Likes
2 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Web_URL - How to substitute run time value

Jump to solution

You may try below.

 

lr_param_sprintf("URL", "URL=http://www.mysite/checkout/summaryDetail.aspx?AcctId=%d", i);

web_url("SummaryDetail.aspx",
            "{URL}",
            "Resource=0",
            "RecContentType=text/html",
            "Referer=www.mysite/checkout/checkout.aspx",
            "Snapshot=t5.inf",
            "Mode=HTML",
            LAST);

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Web_URL - How to substitute run time value

Jump to solution

That worked .Thanks a lot KMathan , you are awesome and very helpful ..... Wonderful..... I was looking for the solution from 2 days and didnt get any help ... Thanks again ...wow !!!!!!!!!

 

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.