Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Highlighted
Jonathan12345 Absent Member.
Absent Member.
515 views

correlation help needed

Jump to solution

Hi, I am working on a vugen script. There is a string I need to correlate: id="WD0203" ct="B" lsdata="{0:'Approve

I need to get the WD0203 as the parameter ApproveID. Here is the what I tried:

    web_reg_save_param_regexp(
        "ParamName=ApproveID",
        "RegExp=id=\"(.*?)\"\\ ct=\"B\"\\ lsdata=\"\{0\:\'Approve",
        SEARCH_FILTERS,
        "Scope=Body",
        "IgnoreRedirections=No",
        "RequestUrl=*/sap/bc/webdynpro/sap/IBO_WDA_INBOX;sap-ext-sid*",
        LAST);    

What did I do wrong? The loadrunner is returning some junk instead of the id although there is no error. Please help.

Thanks,

Jonathan.

 

0 Likes
1 Solution

Accepted Solutions
OlaBerggren Acclaimed Contributor.
Acclaimed Contributor.

Re: correlation help needed

Jump to solution

Hi

Looking at the last attempt, I see "Ordinal=150" , which means take the 150:th occurance of this perticular match. I don't think that is what you want.

When having a normal expression you only need to escape the "double quote character" and the escape character, so also try and remove the last two \

When having regular expressions a lot more needs to be escaped, but that is related to the regular expression itself.

br /ola


Please mark post as solved if your problems or questions is/are resolved.
If this post was valuable to you, please consider kudo it.

 

 

.
0 Likes
6 Replies
Jonathan12345 Absent Member.
Absent Member.

Re: correlation help needed

Jump to solution

Note that there is space in that string.

0 Likes
BingleW Frequent Contributor.
Frequent Contributor.

Re: correlation help needed

Jump to solution

Hello, 

you can select the value in snapshot view, right click on it and select "create parameter..." or "create correlation..." 

will the generated step work for you?  

Thanks,

Bingle(LoadRunner R&D)

0 Likes
Jonathan12345 Absent Member.
Absent Member.

Re: correlation help needed

Jump to solution

Thanks for your response. No, the correlation parameter LR is trying to create is totally off.

0 Likes
Jonathan12345 Absent Member.
Absent Member.

Re: correlation help needed

Jump to solution

By the way, I tried another parameter as the following:

    web_reg_save_param_ex(
        "ParamName=ApproveID1",
        "LB= id=\"",
        "RB=\" ct=\"B\" lsdata=\"\{0:\'Approve",
        "Ordinal=150",
        SEARCH_FILTERS,
        "Scope=Body",
        LAST);

This time it is giving me an appropriate error no match found. From the output, I see the string I am trying to correlate. Here is an extract:

&#x3b;return false&#x3b;" id="WD01E5" ct="B" lsdata="{0:'Approve\x20All',2:'1

 

In LR, which ones are the special characters that need to be escaped? Is there any "debug" on its correlation rule so that I can see what exactly it is trying to do?

Thanks,

Jonathan.

0 Likes
OlaBerggren Acclaimed Contributor.
Acclaimed Contributor.

Re: correlation help needed

Jump to solution

Hi

Looking at the last attempt, I see "Ordinal=150" , which means take the 150:th occurance of this perticular match. I don't think that is what you want.

When having a normal expression you only need to escape the "double quote character" and the escape character, so also try and remove the last two \

When having regular expressions a lot more needs to be escaped, but that is related to the regular expression itself.

br /ola


Please mark post as solved if your problems or questions is/are resolved.
If this post was valuable to you, please consider kudo it.

 

 

.
0 Likes
Jonathan12345 Absent Member.
Absent Member.

Re: correlation help needed

Jump to solution

Thanks, Ola

I pasted the ordinal in by accident. But you are right, I only needed to escape the ; and \. The extra \ actually did more harm than good.

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.