New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Absent Member.
Absent Member.
1235 views

webheaderadd and webparseheader function in ajax perspective

I added Webheaderadd("y-yyy-yyyy","dfiughw8e57gvbgib57nrtgnuein5y7") before the ajax call. where y-yyy-yyyy is the security token and "dfiughw8e57gvbgib57nrtgnuein5y7" is the token i got during recording..

I was able to replay the script for three times.Later the token got expired.this token resides in one of the cookieset as well.How to parse this token.i tried with webresponseparsehdr as well.But not sure on how to use the syntax..tried with different syntax.Kindly provide a solution in an uderstandable way

0 Likes
1 Reply
Highlighted
Micro Focus Expert
Micro Focus Expert

I'd suggest in the first instance to make sure you have cleared cache and cookies before recording your use case. If you already use the -private flag in your SP recorder browser profile, don't worry about this.

If the "dfiughw8e57gvbgib57nrtgnuein5y7" value is generated client-side, then you cannot parse it. You'll need to create some code in your script to generate a unique value for each run. You could also of course consider calling values from an external file but either way it's important to know how the cookie is getting set, how its getting set and the effect this has on the application.

If its set by the server, then search for that value in the recorded TrueLog and see where it first comes in. If it's via a server response, parsing should be possible.

For some more details on cookies and how we handle them, please check this article - community.microfocus.com/.../9816.how-does-silkperformer-handle-cookies.aspx,

Hope it helps!!

Ciaran.

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.