VuGen - save the value of hidden input in HTTP response (992 Views)
Reply
Occasional Contributor
aikanaro79
Posts: 12
Registered: ‎09-15-2011
Message 1 of 4 (992 Views)
Accepted Solution

VuGen - save the value of hidden input in HTTP response

Hi,

 

I have a script in which I place several HTTP requests. At some point, I have to save a value in one of the responses that is in a hidden input field. I tried using "web_reg_save_param" to do it but it seems to be unable to catch the desired value.

 

According to VuGen's documentation, it is possible to do this. At least for point and click scripts but I can't get the value I need.

 

Does anyone have a way of doing this other that using "web_reg_save_param"? Am I right in thinking that this function is only able to parse "visible" HTML? If so, how to accomplish this?

 

Thank you.

HP Expert
Dmitry Shevchenko
Posts: 4,853
Registered: ‎01-30-2008
Message 2 of 4 (991 Views)

Re: VuGen - save the value of hidden input in HTTP response

web_reg_save_param parses raw HTML of the page returned from web server. So the concept of "hidden field" for web_reg_save_param is not relevant. If it doesn't work for you (but you are 100% sure that web server returns the value you want to capture) most likely you didn't place web_reg_save_param in the right place within your script.

Occasional Contributor
aikanaro79
Posts: 12
Registered: ‎09-15-2011
Message 3 of 4 (985 Views)

Re: VuGen - save the value of hidden input in HTTP response

[ Edited ]

Hi Dmitry,

 

Thank you for your help. Nevertheless, none of the 2 possibilities you refer are the situation for me:

- I know the server returns the value because I placed a proxy in the middle to check all passing traffic (fiddler 2) and I can see the value I'm looking for there

- as to the placement inside the script, if I understand it correctly, web_reg_save_param should be placed before the action we want it to act on, so in my case, I placed it right before the web_custom_request action; I can see (in the logs) the search getting registered and if I use the option "ORD=ALL" it is able to catch other values on the response that are not in hidden fields

 

So, do you have any additional tip you can give me? Below you can find the relevant excerpt of the script I'm developing.

 

Thank you.

 

Script:

web_reg_save_param("SAML2Request",
   	 "LB/ic=VALUE=\"",
   	 "RB=\" />",
   	 "ORD=ALL",
   	 LAST);

web_custom_request("SAML2 request",
   	 "Method=GET",
   	 "URL=https://<server>/<app>/index.jsp",
   	 LAST);

 UPDATE: I forgot to mention that I'm using VuGen 9.52 with the following patches:

- HP Vugen SA 9.51 QFE

- HP Vugen SA 9.52 QFE

- Amf and Flex changes for HP Vugen SA 9.50 QFE

Occasional Contributor
aikanaro79
Posts: 12
Registered: ‎09-15-2011
Message 4 of 4 (978 Views)

Re: VuGen - save the value of hidden input in HTTP response

[ Edited ]

Hi,

 

I found out what my problem was. The data I was searching was bigger than 256 characters (default length for web_reg_save_param) and for that reason it was not saving it to my parameter. However, seen as the message was simply an error I didn't honestly remember to check the length.

 

I just used web_set_max_html_param_len before the web_reg_save_param and the problem was solved!

 

Thank you again for the help.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.