51Testing软件测试论坛
标题:
变量使用的问题!
[打印本页]
作者:
dingle_lily
时间:
2006-12-20 09:51
标题:
变量使用的问题!
定义一个变量Flag,用来判断查询的状态:如果查询结果为空的时,为Fail,反之,为Success。如下
if(result == NULL) {
flag = "Fail";
}
else {
flag = "Success";
}
web_url("DialogAlarm.jsp",
"URL=http://10.200.80.70:8000/test/common/DialogAlarm.jsp?info=
flag
",
"Resource=0",
"RecContentType=text/html",
"Referer=http://10.200.80.70:8000/test/common/dialog.htm",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"URL=../images/bg_button_left.jpg", "Referer=http://10.200.80.70:8000/bss/common/DialogAlarm.jsp?info=Success", ENDITEM,
"URL=../images/bg_button_center.jpg", "Referer=http://10.200.80.70:8000/bss/common/DialogAlarm.jsp?info=Success", ENDITEM,
"URL=../images/bg_button_right.jpg", "Referer=http://10.200.80.70:8000/bss/common/DialogAlarm.jsp?info=Success", ENDITEM,
LAST);
但是在输出的时候,总是输的是“flag”,而不是“Success”或“Fail”
请问,怎么解决啊?
作者:
andy
时间:
2006-12-20 21:26
此flag非彼flag 因为前面的flag是变量,而后面的字符串.
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2