个人网站: www.7dtest.com 7点测试群:(61369656)------(77273408)------(35710365)------(9410090)

Zee的LR脚本练习二:循环打印web_reg_save_param保存的参数

上一篇 / 下一篇  2007-03-28 09:31:33 / 个人分类:Zee的生活

Action()
{
    char buffer[128] = {0};
 int j;
    int i;

  web_reg_save_param("param1",
  "LB=Content-Length: ",
  "RB=\r\n""",
  "NotFound=ERROR",
     "Ord=all",
  "Search=Headers",
  LAST);

 web_url("www.hao123.com",
  "URL=http://www.hao123.com/",
  "Resource=0",
  "RecContentType=text/html",
  "Referer=",
  "Snapshot=t2.inf",
  "Mode=HTML",
  LAST);

 //lr_save_string(lr_eval_string("{param1_count}"),"j");
   j=atoi(lr_eval_string("{param1_count}"));
   lr_output_message("the j is %d",j);

  for(i=1;i<=atoi(lr_eval_string("{param1_count}"));i++)
   {

   sprintf( buffer, "{param1_%d}", i);
     lr_output_message("the conut is %s.",lr_eval_string(buffer));

    }

  return 0;


TAG: Zee的生活

孙明星的测试技术空间 引用 删除 Lennon   /   2009-05-18 13:03:50
哦。原来如此。谢谢
如果Zee还在工作 引用 删除 Zee   /   2009-05-17 14:21:03
这个_count是内嵌的一个参数。当关联了之后,可以直接调用param_count来得到数组的长度。
孙明星的测试技术空间 引用 删除 Lennon   /   2009-05-13 13:09:58
是不是少了句web_reg_find阿?param1_count哪来的啊
引用 删除 hgl   /   2008-01-16 17:58:57
呵,学习中
 

评分:0

我来说两句

我的栏目

日历

« 2024-05-09  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 158961
  • 日志数: 146
  • 图片数: 1
  • 建立时间: 2006-12-05
  • 更新时间: 2012-11-16

RSS订阅

Open Toolbar