Quantcast
Channel: LoadRunner Practitioners Forum topics
Viewing all articles
Browse latest Browse all 3978

I need help creating rules to insert custom headers before uniquely named submits, such as, "init."

$
0
0

I have a script that I have setup to appease our Worklight with the custom headers our programmers used.  The issue is that everytime I test against this webapp, I have to insert the web_add_custom_header stuff before these submits, and there could be a high number or low number of them.  The headers are static, just not standard, so I would like to know how I can go about adding these as rules.

 

So, it would go something like this in my head:

 

//'''''' Added to make Worklight happy.
	web_add_auto_header("x-wl-app-version",
		"1.0");
	web_add_auto_header("x-wl-clientlog-appname", 
		"Asdf");

	web_add_auto_header("x-wl-clientlog-appversion", 
		"1.0");

	web_add_auto_header("x-wl-clientlog-deviceId", 
		"UNKNOWN");

	web_add_auto_header("x-wl-clientlog-env", 
		"desktopbrowser");

	web_add_auto_header("x-wl-clientlog-model", 
		"UNKNOWN");
//''''''
	
	web_submit_data("init",
		"Action=https://test.Xxxxxxxxx.com/wlpol/apps/services/api/Xxxxxxxxx/desktopbrowser/init", 
		"Method=POST", 
		"TargetFrame=", 
		"RecContentType=application/json", 
		"Referer=https://test.Xxxxxxxxx.com/wlpol/apps/services/www/Xxxxxxxxx/desktopbrowser/default/index.html#/home/content", 
		"Snapshot=t102.inf", 
		"Mode=HTML", 
		ITEMDATA, 
		"Name=isAjaxRequest", "Value=true", ENDITEM, 
		"Name=x", "Value=0.08130873072177241", ENDITEM, 
		LAST);

So you can see above the custom headers that are added.  And the step that they need to go before is here too, "init."

 

 

I have looked at tutorials, and thought I would ask this question here while I research more.


Thanks!

 


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>