Highlighted
Absent Member.
Absent Member.
73 views

How to correlate from the server request?

Hi there,
I am testing a java script application and it has function to attach a document and then upload it to the server. I want to correlate the value from EncType but the value is from the Server request. The web_reg_save_param seems only works on the server response. I tried run the script without the correlation either on the html mode or URL but it returned "the internal error". The below is the recorded script.

web_custom_request("lsw_create_attach_to_filesystem_new2.jsp_3", "URL=http://sd1capssy08:7011/teamworks/html/custom/fileupload/lsw_create_attach_to_filesystem_new2.jsp?param=Doc1.doc",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer=http://xxxxxxx08:7011/teamworks/html/custom/fileupload/lsw_create_attach_to_filesystem_new2.jsp",
"Snapshot=t20.inf",
"Mode=HTML",
"EncType=multipart/form-data; boundary=---------------------------7d919f32c04b4",
"BodyBinary=-----------------------------7d919f32c04b4\r\nContent-Disposition: form-data; name=\"FILENAME\"; filename=\"Z:\\x5CDoc1.doc\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----------------------------7d919f32c04b4\r\nContent-Disposition: form-data; name=\"TITLE_FILE\"\r\n\r\nDoc1.doc\r\n------"
"-----------------------7d919f32c04b4\r\nContent-Disposition: form-data; name=\"Attach\"\r\n\r\nAttach File\r\n-----------------------------7d919f32c04b4--\r\n", LAST);
0 Likes
1 Reply
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: How to correlate from the server request?

Since you are attaching the file for upload on the client there is no way to capture the data with your script. After you record the script you will not execute the client side code again so it will not be available during playback anyway.

You might want to try and record the script in URL mode without web_custom_requests to see if that is easier to deal with.

If you want to use different files you could record with different file attachments and use multiple header files to contain the data and randomly select the filename and binary data during playback. It is cumbersome but should work.

Alan
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.