09-23-2011 10:05 AM
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?
Solved! Go to Solution.
09-23-2011 07:22 PM
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.
09-26-2011 03:16 AM - edited 09-26-2011 03:40 AM
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.
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
09-26-2011 06:48 AM - edited 09-26-2011 06:48 AM
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.