Highlighted
Absent Member.
Absent Member.
1805 views

How do I Parameterize the Session ID using VuGen?

I need your help, Gurus!

After recording, Session IDs are visible in the script, but, using VuGen's Correlate feature won't parameterize them.

So how do I parameterize this session ids by myself? Or is there a way to write the VuGen script without Session ID? Thanks very much!

Regards,

web_url("xxxx",
"URL=xxx",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=../stylesheet/ie-fix.css", ENDITEM,
"Url=../images/dot_background.gif", ENDITEM,
"Url=../images/sidebar_mid_student.gif", ENDITEM,
"Url=../images/sidebar_corners_student.gif", ENDITEM,
LAST);

web_submit_data("fafsaForm_2",
"Action=xxxx",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=xxxx",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=FAFSA:_link_hidden_", "Value=", ENDITEM,
"Name=FAFSA_SUBMIT", "Value=1", ENDITEM,
---> "Name=javax.faces.ViewState", "Value=6U2mOR/Mt0y+IVCUCzhoxJAv7la36wYTC4eOz6TN/TH6h62i17MsXmBD8+kquxkLCCa350ULPEppAgV4YrsHzHkSCjc2Bfv2mCKUNdcK/bnBzD/JAioAKQ==", ENDITEM,
EXTRARES,
URL = "..."
URL = "..."
LAST);
0 Likes
3 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: How do I Parameterize the Session ID using VuGen?

You will need to put a web_reg_save_param (highlight and hit F1 for help on syntax) before you initially call the page. For example:

web_reg_save_param("ViewState","LB=javax.faces.ViewState\" Value=\"","RB=\" />","NotFound=Warning",LAST);

web_url("xxxx", ...

web_submit_data("fafsaForm_2", ...

Then replace the ViewState string with {ViewState}. Personally, I don't depend on LR to correlate for me - I always do this manually.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: How do I Parameterize the Session ID using VuGen?

Thanks James.

If after the
web_submit_data("anyForm_2", ...)
there are consecutively
web_submit_data("anyForm_3", ...), web_submit_data("anyForm_4", ...), ...
and so on, and each of the 'web_submit_data("anyForm_N"...) paragraph has a {ViewState} session id,

** Should we always put the web_reg_save_param() statement, before the last "web_submit_data", instead of the current paragraph (current page) that we're looking for the session id?

Sorry if I didn't express this clear enough but, hoping you'd understand.

Thanks for your help!
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: How do I Parameterize the Session ID using VuGen?

Yes, you will need to have a web_reg_save_param before each web_submit_data that uses the ViewState.

However, keep in mind that some developers misuse ViewState. Sometimes it is completely unnecessary to correlate it, and sometimes you don't need to submit it at all.

Here is a good write-up on understanding ViewState: http://msdn.microsoft.com/en-us/library/ms972976.aspx
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.