点点点苹果 发表于 2015-5-20 16:02:25

lr设置检查点

lr设置检查点来验证用户注册成功否,出现Action.c(48): web_find started       
Action.c(48): Error -27195: "checkpoint" failed. 0 occurrence(s) of "Tina" found (RightOf=",", LeftOf=",")       
Action.c(48): web_find highest severity level was "ERROR"        ,是什么原因???
代码如下:
Action()
{
        lr_rendezvous("register together");
       
        lr_start_transaction("register");

        web_url("WebTours",
                "URL=http://localhost:1080/WebTours/",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                LAST);


        web_url("sign up now",
                "URL=http://localhost:1080/cgi-bin/login.pl?username=&password=&getInfo=true",
                "TargetFrame=body",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://localhost:1080/WebTours/home.html",
                "Snapshot=t2.inf",
                "Mode=HTML",
                LAST);

        web_submit_data("login.pl",
                "Action=http://localhost:1080/cgi-bin/login.pl",
                "Method=POST",
                "TargetFrame=info",
                "RecContentType=text/html",
                "Referer=http://localhost:1080/cgi-bin/login.pl?username=&password=&getInfo=true",
                "Snapshot=t3.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=username", "Value={username}", ENDITEM,
                "Name=password", "Value={password}", ENDITEM,
                "Name=passwordConfirm", "Value={password}", ENDITEM,
                "Name=firstName", "Value=Tinn", ENDITEM,
                "Name=lastName", "Value=lin", ENDITEM,
                "Name=address1", "Value=nbfjhr", ENDITEM,
                "Name=address2", "Value=09876", ENDITEM,
                "Name=register.x", "Value=45", ENDITEM,
                "Name=register.y", "Value=8", ENDITEM,
                LAST);
       
        web_find("checkpoint",
                "What={username}",
             LAST);
       
        lr_end_transaction("register", LR_AUTO);

        return 0;
}

saharaqs 发表于 2015-5-20 18:59:29

看看 web_submit_data("login.pl", 这个页面的response里有没有你要找的那个值

Lyncent 发表于 2015-5-21 09:12:26

web_find函数要放在web_submit_data之前

地壳 发表于 2015-5-21 09:30:49

web_find函数要放到页面请求函数web_url()之前
页: [1]
查看完整版本: lr设置检查点