|
录制了一个添加员工脚本,其中添加页面部分脚本如下:
ITEMDATA,
"Name=forms_submit_id", "Value=", ENDITEM,
"Name=login", "Value=test113", ENDITEM,
"Name=name", "Value=test113", ENDITEM,
"Name=address", "Value=", ENDITEM,
"Name=password", "Value=123456", ENDITEM,
"Name=password1", "Value=123456", ENDITEM,
"Name=id", "Value=", ENDITEM,
我想将 "Name=login", "Value=test113", ENDITEM, 这一行改用一个字符串代替,修改的脚本如下
int i=4;
char str[1024],str_w[1024];
sprintf (str,"\"Name=login\", \"Value=test11%d",i);
lr_output_message("str~~~~~~~~~~~``%s",str);
strcat(str,"\", ENDITEM ,");
lr_output_message("str=%s",str);//输出 str=“Name=login", "Value=test114", ENDITEM ,
ITEMDATA,
"Name=forms_submit_id", "Value=", ENDITEM,
//"Name=login", "Value=test113", ENDITEM,
str,
"Name=name", "Value=test113", ENDITEM,
"Name=address", "Value=", ENDITEM,
"Name=password", "Value=123456", ENDITEM,
"Name=password1", "Value=123456", ENDITEM,
"Name=id", "Value=", ENDITEM,
错误信息:Error -27225: The ""Name=login", "Value=test114", ENDITEM ," argument (number 12) is not recognized within "ITEMDATA" [MsgId: MERR-27225]
请大家帮帮忙,看看我哪里写错了呢? |
|