复制粘贴后回放,LR用红字提示:
  Action.c(23): Error -27995: Requested link ("Text=发送传真") not found   [MsgId: MERR-27995]
  Action.c(23): web_link("发送传真") highest severity level was "ERROR", 0 body bytes, 0 header bytes   [MsgId: MMSG-26388]
  找不到链接?见鬼了!明明有的啊。
  重新开一个脚本,另外录制一个再试试:
  脚本B

 

Action()
{
web_url("mptest",
"URL=http://192.168.39.164:8000/mptest/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_link("发送传真",
"Text=发送传真",
"Snapshot=t2.inf",
LAST);
return 0;
}
回放,OK!
哈哈,小样的,难不倒我。
把脚本B的
web_link("发送传真",
"Text=发送传真",
"Snapshot=t2.inf",
LAST);

  这段脚本copy回原先的脚本A,这总没问题了吧?
  点击回放,LR还是提示刚才的错误。咦?这是咋回事?
  此路不通,我反其道而行之。反过来把

 

web_custom_request("SendFax",
"URL=http://192.168.39.164:8000/mptest/SendFax",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.39.164:8000/mptest/sendFax.jsp",
"Snapshot=t3.inf",
"Mode=HTML",
"EncType=multipart/form-data; boundary=---------------------------7d97d2d7209f6",
"BodyBinary=-----------------------------7d97d2d7209f6 "
"Content-Disposition: form-data; name="address" "
" "
"05928556088 "
"-----------------------------7d97d2d7209f6 "
"Content-Disposition: form-data; name="senderName" "
" "
"05928064212 "
"-----------------------------7d97d2d7209f6 "
"Content-Disposition: form-data; name="title" "
" "
"sfsd "
"-----------------------------7d97d2d7209f6 "
"Content-Disposition: form-data; name="content" "
" "
"sfd "
"-----------------------------7d97d2d7209f6 "
"Content-Disposition: form-data; name="email" "
" "
"dfd "
"-----------------------------7d97d2d7209f6 "
"Content-Disposition: form-data; name="pageheader" "
" "
"sf "
"-----------------------------7d97d2d7209f6 "
"Content-Disposition: form-data; name="attachment"; filename="C:"
"\x5C"
"Documents and Settings"
"\x5C"
"Administrator"
"\x5C"
"妗??"
"\x5C"
"1.txt" "
"Content-Type: text/plain "
" "
"一、G网测试: "
"SE W810c、Nokia 6120c、Motorola W510、SE W800c "
"二、C网测试: "
"三、回归测试: "
"SE W580i、NOkia n93、Nokia6670(9.9号安排回归测试) "
"Motorola Z3、SE W810c(9.8号安排回归测试) "
"NOKIA5700、Nokia N73(9.5号安排回归测试) "
" "
" "
"*57*号码# "
"*41*号码# "
"#57# "
" "
"0951-8121648 "
" "
"-----------------------------7d97d2d7209f6-- "
"",
LAST);

  这段copy到脚本B中,回放,成功!
  不知道大家看明白了没有,整个过程的确是很诡异,我也没搞懂这是为什么,但至少终还是把问题解决了。有的时候,测试人员千万不要认死理,一条胡同走到黑,遇到问题的时候试试换个角度去解决。
  山重水复疑无路,柳暗花明又一村!