Highlighted
Member.
239 views

Have a question on how to correlate cookies

I have lot of web_add_cookie statements in the script.   These are getting used in the HTTP Requests, how do I correlate the cookies 

0 Likes
2 Replies
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Have a question on how to correlate cookies

Hi Kiranv, 

do the script runs well after recording phase? I think their automatic capture is useful for running the script; maybe you can try to select one string from the Snapshot layout, and add a web_reg_save_param(). Tell me if this simple solution can help you. 

Lorenzo

0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Have a question on how to correlate cookies

I'm just wondering why LR adds all those web_add_cookie statements. I start with commenting them out and see if my script runs fine. Normally cookies are controlled by the server and handled correctly by LR. The only reason I can think of, is that your script simulates this way a "pre-filled cookie store". Ignoring them saves a lot of time / effort.

Tip:

A quick way to transform all web_add_cookie calls into void calls use at top of script:

#define web_add_cookie(X)

 

Signature:
Reward community members who take time to respond and help.
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.