Difference between revisions of "LoadRunner Code Snippets 2"
Jump to navigation
Jump to search
PeterHarding (talk | contribs) (New page: __TOC__ =Some More LoadRunner Code Snippets= ==Write Page Content to File== <pre> </pre> Category:LoadRunner) |
PeterHarding (talk | contribs) |
||
Line 6: | Line 6: | ||
<pre> | <pre> | ||
web_reg_save_param("body", | |||
"LB/IC=<body>", | |||
"RB/IC=</body>", | |||
"Search=Body", | |||
LAST); | |||
web_custom_request("BSPWDApplication.do", | |||
"URL=http://xxxx:8000/sap(bD1lbiZjPTAzMSZkPW1pbg==)/bc/bsp/sap/crm_ui_frame/BSPWDApplication.do?id=0&sap-client=099&sap-language=EN", | |||
"Method=POST", | |||
"Resource=0", | |||
"RecContentType=text/html", | |||
"Referer=http://xxxx:8000/sap(bD1lbiZjPTAzMSZkPW1pbg==)/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&htmlbevt_oid=C13_W39_V40_SEARCH_BTN&htmlbevt_id=search&htmlbevt_cnt=0&htmlbevt_par1=&htmlbevt_par2=&htmlbevt_par3=&htmlbevt_par4=&htmlbevt_par5=&htmlbevt_par6=&htmlbevt_par7=&htmlbevt_par8=&htmlbevt_par9=&onInputProcessing=htmlb&myFormId_complete=&sap-htmlb-design=&sap-ajaxtarget=C1_W1_V2_C1_W1_V2_V3_C13_W39_V40_MainSearch.do&sap-ajax_dh_mode=AUTO&thtmlbKeyboardFocusId=C13_W39_V40_SEARCH_BTN&C6_W18_V19_selected_key=&" | |||
"thtmlbSliderState=&crmFrwScrollXPos=0&crmFrwScrollYPos=0&C1_W1_V2_V3_V20_bchistory_selection=&C13_W39_V40_V43_search_struct.category=&C13_W39_V40_search_PARAMETERS[1].FIELD=MC_NAME1&C13_W39_V40_search_PARAMETERS[1].OPERATOR=EQ&C13_W39_V40_search_PARAMETERS[1].VALUE1=&C13_W39_V40_search_PARAMETERS[1].VALUE2=&C13_W39_V40_search_PARAMETERS[2].FIELD=CITY1&C13_W39_V40_search_PARAMETERS[2].OPERATOR=EQ&C13_W39_V40_search_PARAMETERS[2].VALUE1=&C13_W39_V40_search_PARAMETERS[2].VALUE2=&" | |||
"C13_W39_V40_search_PARAMETERS[3].FIELD=ROLE&C13_W39_V40_search_PARAMETERS[3].OPERATOR=EQ&C13_W39_V40_search_PARAMETERS[3].VALUE1=CRM000&C13_W39_V40_search_PARAMETERS[3].VALUE2=&C13_W39_V40_search_PARAMETERS[4].FIELD=PARTNER&C13_W39_V40_search_PARAMETERS[4].OPERATOR=EQ&C13_W39_V40_search_PARAMETERS[4].VALUE1=&C13_W39_V40_search_PARAMETERS[4].VALUE2=&C13_W39_V40_search_MAX_HITS=100&C14_W44_V45_savesearchas_name=&C13_W39_V40_V42_Table_isCellerator=TRUE&C13_W39_V40_V42_Table_selectedRows=&" | |||
"C13_W39_V40_V42_Table_rowCount=0&C13_W39_V40_V42_Table_visibleRowCount=0&C13_W39_V40_V42_Table_lastSelectedRow=&C13_W39_V40_V42_Table_allRowSelected=&C13_W39_V40_V42_Table_visibleFirstRow=1&C13_W39_V40_V42_Table_scrollPosition=&C13_W39_V40_V42_Table_bindingString=%2F%2FRESULT%2FTable&C13_W39_V40_V42_Table_filterValue=&C13_W39_V40_V42_Table_sortValue=&C13_W39_V40_thtmlbShowSearchFields=true&thtmlbScrollAreaWidth=0&thtmlbScrollAreaHeight=639<X_PREFIX_ID=C1_W1_V2_&C1_W1_V2_LTX_VETO_FLAG=&" | |||
"C1_W1_V2_ACTION_GUID=&C1_W1_V2_AC_OBJECT_KEY=&C1_W1_V2_AC_VALUE=&C1_W1_V2_AC_CONTAINER=&C1_W1_V2_MYITSLOCATION=&sap-ajax_request=X&_=", | |||
LAST); | |||
if (pfp = fopen("0001.txt", "w")) { | |||
fprintf( pfp, "%s", lr_eval_string("{body}")); | |||
fclose(pfp); | |||
} | |||
</pre> | </pre> | ||
[[Category:LoadRunner]] | [[Category:LoadRunner]] |
Revision as of 15:32, 24 November 2008
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(bD1lbiZjPTAzMSZkPW1pbg==)/bc/bsp/sap/crm_ui_frame/BSPWDApplication.do?id=0&sap-client=099&sap-language=EN", "Method=POST", "Resource=0", "RecContentType=text/html", "Referer=http://xxxx:8000/sap(bD1lbiZjPTAzMSZkPW1pbg==)/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&htmlbevt_oid=C13_W39_V40_SEARCH_BTN&htmlbevt_id=search&htmlbevt_cnt=0&htmlbevt_par1=&htmlbevt_par2=&htmlbevt_par3=&htmlbevt_par4=&htmlbevt_par5=&htmlbevt_par6=&htmlbevt_par7=&htmlbevt_par8=&htmlbevt_par9=&onInputProcessing=htmlb&myFormId_complete=&sap-htmlb-design=&sap-ajaxtarget=C1_W1_V2_C1_W1_V2_V3_C13_W39_V40_MainSearch.do&sap-ajax_dh_mode=AUTO&thtmlbKeyboardFocusId=C13_W39_V40_SEARCH_BTN&C6_W18_V19_selected_key=&" "thtmlbSliderState=&crmFrwScrollXPos=0&crmFrwScrollYPos=0&C1_W1_V2_V3_V20_bchistory_selection=&C13_W39_V40_V43_search_struct.category=&C13_W39_V40_search_PARAMETERS[1].FIELD=MC_NAME1&C13_W39_V40_search_PARAMETERS[1].OPERATOR=EQ&C13_W39_V40_search_PARAMETERS[1].VALUE1=&C13_W39_V40_search_PARAMETERS[1].VALUE2=&C13_W39_V40_search_PARAMETERS[2].FIELD=CITY1&C13_W39_V40_search_PARAMETERS[2].OPERATOR=EQ&C13_W39_V40_search_PARAMETERS[2].VALUE1=&C13_W39_V40_search_PARAMETERS[2].VALUE2=&" "C13_W39_V40_search_PARAMETERS[3].FIELD=ROLE&C13_W39_V40_search_PARAMETERS[3].OPERATOR=EQ&C13_W39_V40_search_PARAMETERS[3].VALUE1=CRM000&C13_W39_V40_search_PARAMETERS[3].VALUE2=&C13_W39_V40_search_PARAMETERS[4].FIELD=PARTNER&C13_W39_V40_search_PARAMETERS[4].OPERATOR=EQ&C13_W39_V40_search_PARAMETERS[4].VALUE1=&C13_W39_V40_search_PARAMETERS[4].VALUE2=&C13_W39_V40_search_MAX_HITS=100&C14_W44_V45_savesearchas_name=&C13_W39_V40_V42_Table_isCellerator=TRUE&C13_W39_V40_V42_Table_selectedRows=&" "C13_W39_V40_V42_Table_rowCount=0&C13_W39_V40_V42_Table_visibleRowCount=0&C13_W39_V40_V42_Table_lastSelectedRow=&C13_W39_V40_V42_Table_allRowSelected=&C13_W39_V40_V42_Table_visibleFirstRow=1&C13_W39_V40_V42_Table_scrollPosition=&C13_W39_V40_V42_Table_bindingString=%2F%2FRESULT%2FTable&C13_W39_V40_V42_Table_filterValue=&C13_W39_V40_V42_Table_sortValue=&C13_W39_V40_thtmlbShowSearchFields=true&thtmlbScrollAreaWidth=0&thtmlbScrollAreaHeight=639<X_PREFIX_ID=C1_W1_V2_&C1_W1_V2_LTX_VETO_FLAG=&" "C1_W1_V2_ACTION_GUID=&C1_W1_V2_AC_OBJECT_KEY=&C1_W1_V2_AC_VALUE=&C1_W1_V2_AC_CONTAINER=&C1_W1_V2_MYITSLOCATION=&sap-ajax_request=X&_=", LAST); if (pfp = fopen("0001.txt", "w")) { fprintf( pfp, "%s", lr_eval_string("{body}")); fclose(pfp); }