ALERT! The community will be read-only starting on April 19, 8am Pacific as the migration begins. Read more for important details.
ALERT! The community will be read-only starting on April 19, 8am Pacific as the migration begins.Read more for important details.
Absent Member.. Absent Member..
Absent Member..
22316 views

web_custom_request - correlation for 2F%, %2B etc

Jump to solution

Hi,

 

We have recorded the web script  where in web_custom_request sends VIEWSTATE and EVENTVALIDATION with additional character 2F% or RB% etc where as server response for this request is without these characters 

 

Can you suggest how to correlate these values?? 

 

I tried to use HTML_TO_URL in web_reg_save_param as a variable but LR throws an error as invalid variable 

 

please let me know your thought 

 

Thanks 

Deb

Thanks
Deb
0 Likes
1 Solution

Accepted Solutions
Absent Member.
Absent Member.

Hello Deb!

 

After correlation you to to do some conversion of the string. Try to use the following commands:

     lr_output_message("Correlated Value %s ", lr_eval_string("{YourCorrelatedValue}"));

     web_convert_param("YourCorrelatedValue", "SourceEncoding=URL", "TargetEncoding=HTML", LAST);

     lr_output_message("Converted Value %s ", lr_eval_string("{YourCorrelatedValue}"));

 

You will see that for example "%2F" is changed to "/".

 

Regards

Thomas

View solution in original post

5 Replies
Absent Member.. Absent Member..
Absent Member..

For more reference, copied the recorded and server response here 

 

Recorded 

"__VIEWSTATE=%2FwEPDwULLTE2MjQyMDgxMDEPZBYCZg9kFgICAQ9kFggCAQ8WAh4EVGV4dAUINDcwNDI0NTJkAgcPFgIeBGhyZWYFPmh0dHA6Ly93d3cuYWdsLmNvbS5hdS9TaXRlVG9vbHMvUGFnZXMvRkFRcy5hc3B4P2NhdD1Ib21lK0ZBUSdzZAILD2QWBGYPZBYCZg9kFgICAQ8WAh8ABcACPGRpdj48ZGl2PlRvIHZpZXcgeW91ciBjb25zdW1wdGlvbiwgc2VsZWN0IGFuIGVuZXJneSB0eXBlIGFuZCBhIGRhdGUgcmFuZ2UuPC9kaXY%2BPGRpdj7CoDwvZGl2PjxkaXY%2BWW91IHdpbGwgc2VlIGEgZ3JhcGggc2hvd2luZyB5b3VyIGF2ZXJhZ2UgZGFpbHkgdXNhZ2UgYW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wNgIwNwIwOAIwOQIxMAIxMQIxMhQrAw1nZ2dnZ2dnZ2dnZ2dnZGQCBw8QDxYCHwRnZBAVBgRZWVlZBDIwMDgEMjAwOQQyMDEwBDIwMTEEMjAxMhUGAAQyMDA4BDIwMDkEMjAxMAQyMDExBDIwMTIUKwMGZ2dnZ2dnZGQCCQ8QDxYCHwRnZBAVDQJNTQIwMQIwMgIwMwIwNAIwNQIwNgIwNwIwOAIwOQIxMAIxMQIxMhUNAAIwMQIwMgIwMwIwNAIwNQIwNgIwNwIwOAIwOQIxMAIxMQIxMhQrAw1nZ2dnZ2dnZ2dnZ2dnZGQCCw8QDxYCHwRnZBAVBgRZWVlZBDIwMDgEMjAwOQQyMDEwBDIwMTEEMjAxMhUGAAQyMDA4BDIwMDkEMjAxMAQyMDExBDIwMTIUKwMGZ2dnZ2dnZGQCDQ8WAh4JaW5uZXJodG1sZWQCEQ8WAh4HVmlzaWJsZWhkAg0PZBYEAgEPZBYCAgEPFgIeBXN0eWxlBRhjdXJzb3I6cG9pbnRlcjtkaXNwbGF5OjtkAgUPZBYCZg8WAh8AZGRkqgUstyhmbc8TPHowyTgJdBJE2lg=|

Thanks
Deb
0 Likes
Absent Member.
Absent Member.

Hello Deb!

 

After correlation you to to do some conversion of the string. Try to use the following commands:

     lr_output_message("Correlated Value %s ", lr_eval_string("{YourCorrelatedValue}"));

     web_convert_param("YourCorrelatedValue", "SourceEncoding=URL", "TargetEncoding=HTML", LAST);

     lr_output_message("Converted Value %s ", lr_eval_string("{YourCorrelatedValue}"));

 

You will see that for example "%2F" is changed to "/".

 

Regards

Thomas

View solution in original post

Absent Member.. Absent Member..
Absent Member..

It might be easier to convert the "web_custom_request" to "web_submit_data". This could be achieved by using tools like Firebug to convert the Body of web_custom_request to Name-Value combination for web_submit_data.

0 Likes
Absent Member.
Absent Member.

are you getting the error in the script because of this issue?

 

Its doesn’t matter of getting the server response as  HTML-encoded or URL-encoded as long as u get the proper response since web_custome_request supports both the format and even server accepts this.

 

Even if u submit the the encoded format u will get the response from the serevr....

0 Likes
Absent Member.
Absent Member.

The simple and easiest way to do correlation for these kind of custom_requests especially _VIEWSTATE by creating some rules with right LB & RB and re-generate the script. LR will create web_reg_save_param and web_convert_param functions for you in the appropriate places. Make Sure  the size "MaxParamLen" in CorrelationSettings.xml under config folder would be more than 4096. Sometimes, the size of the ViewState will be more than 4096 bytes. So in such cases some view states won't be correlated as you expect.

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.