Difference between revisions of "LoadRunner Code Snippets 2"

From PeformIQ Upgrade
Jump to navigation Jump to search
Line 13: Line 13:


web_custom_request("BSPWDApplication.do",  
web_custom_request("BSPWDApplication.do",  
"URL=http://xxxx:8000/sap(xxxx==)/bc/bsp/sap/crm_ui_frame/BSPWDApplication.do?id=0&sap-client=099&sap-language=EN",  
"URL=http://xxxx:8000/sap(xxxx==)/bc/bsp/sap/crm_ui_frame/Application.do?id=0&sap-client=099&sap-language=EN",  
"Method=POST",  
"Method=POST",  
"Resource=0",  
"Resource=0",  

Revision as of 17:29, 24 September 2014

Some More LoadRunner Code Snippets

Write Page Content to File

	web_reg_save_param("body",
		"LB/IC=<body>",
		"RB/IC=</body>",
		"Search=Body",
		LAST);

	web_custom_request("BSPWDApplication.do", 
		"URL=http://xxxx:8000/sap(xxxx==)/bc/bsp/sap/crm_ui_frame/Application.do?id=0&sap-client=099&sap-language=EN", 
		"Method=POST", 
		"Resource=0", 
		"RecContentType=text/html", 
		"Referer=http://xxxx:8000/sap(xxxx==)/bc/bsp/sap/crm_ui_frame/BSPWDApplication.do?id=0&sap-client=031&sap-language=EN", 
		"Snapshot=t100.inf", 
		"Mode=HTTP", 
		"Body=htmlbevt_ty=htmlb%3Abutton%3Aclick%3A0&htmlbevt_frm=myFormId&...C1_W1_V2_MYITSLOCATION=&sap-ajax_request=X&_=", 
		LAST);

	if (pfp = fopen("0001.txt", "w")) {
		fprintf( pfp, "%s", lr_eval_string("{body}"));
		fclose(pfp);
	}