51Testing软件测试论坛

标题: 脚本回放时报错RunnTime Error [打印本页]

作者: laipi    时间: 2008-4-23 17:39
标题: 脚本回放时报错RunnTime Error
[attach]41407[/attach]我回放的是LR8.0自带的脚本tutorial下的脚本

#include "web_api.h"


Action()
{
        // [WCSPARAM WCSParam_Diff1 44 88160.6878088295tfDtHzfpDHQVzzzHcHcAipfQccHf] Parameter {WCSParam_Diff1} created by Correlation Studio
        web_reg_save_param("WCSParam_Diff1",
                "LB=userSession value=",
                "RB=>",               
                "Ord=1",
                "RelFrameId=1.2.1",
                "Search=Body",
                LAST);

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


        lr_start_transaction("logon");

        web_submit_data("login.pl",
                "Action=http://localhost:1080/MercuryWebTours/login.pl",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://localhost:1080/MercuryWebTours/nav.pl?in=home",
                "Snapshot=t2.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=userSession", "Value={WCSParam_Diff1}", ENDITEM,
                "Name=username", "Value=jojo", ENDITEM,
                "Name=password", "Value=bean", ENDITEM,
                "Name=JSFormSubmit", "Value=on", ENDITEM,
                "Name=login.x", "Value=43", ENDITEM,
                "Name=login.y", "Value=9", ENDITEM,
                LAST);

        lr_end_transaction("logon", LR_AUTO);


        lr_think_time(2);


        lr_start_transaction("search_flight");

        web_image("Search Flights Button",
                "Alt=Search Flights Button",
                "Snapshot=t3.inf",
                EXTRARES,
                "URL=FormDateUpdate.class", ENDITEM,
                "URL=CalSelect.class", ENDITEM,
                LAST);

        lr_end_transaction("search_flight", LR_AUTO);


        lr_think_time(2);


        web_submit_form("reservations.pl",
                "Snapshot=t4.inf",
                ITEMDATA,
                "Name=depart", "Value={origin}", ENDITEM,
                "Name=departDate", "Value=06/28/2004", ENDITEM,
                "Name=arrive", "Value=Los Angeles", ENDITEM,
                "Name=returnDate", "Value=06/29/2004", ENDITEM,
                "Name=numPassengers", "Value=1", ENDITEM,
                "Name=roundtrip", "Value=<OFF>", ENDITEM,
                "Name=seatPref", "Value=None", ENDITEM,
                "Name=seatType", "Value=Coach", ENDITEM,
                "Name=findFlights.x", "Value=43", ENDITEM,
                "Name=findFlights.y", "Value=14", ENDITEM,
                LAST);
        lr_think_time(2);


        lr_start_transaction("book_flight");
        lr_think_time(2);

        web_submit_form("reservations.pl_2",
                "Snapshot=t5.inf",
                ITEMDATA,
                "Name=reserveFlights.x", "Value=38", ENDITEM,
                "Name=reserveFlights.y", "Value=4", ENDITEM,
                LAST);

        lr_end_transaction("book_flight", LR_AUTO);


        lr_think_time(2);

        web_reg_find("Text=Thank you",
                LAST);

        web_submit_form("reservations.pl_3",
                "Snapshot=t6.inf",
                ITEMDATA,
                "Name=firstName", "Value=Joseph", ENDITEM,
                "Name=lastName", "Value=Marshall", ENDITEM,
                "Name=address1", "Value=234 Willow Drive", ENDITEM,
                "Name=address2", "Value=San Jose/CA/94085", ENDITEM,
                "Name=pass1", "Value=Joseph Marshall", ENDITEM,
                "Name=creditCard", "Value=12345678", ENDITEM,
                "Name=expDate", "Value=", ENDITEM,
                "Name=saveCC", "Value=<OFF>", ENDITEM,
                "Name=buyFlights.x", "Value=60", ENDITEM,
                "Name=buyFlights.y", "Value=13", ENDITEM,
                LAST);
        lr_think_time(2);

        web_image_check("web_image_check",
                "Src=splash_flightconfirm.gif",
                LAST);
        lr_start_transaction("check_itinerary");

        web_image("Itinerary Button",
                "Alt=Itinerary Button",
                "Ordinal=1",
                "Snapshot=t7.inf",
                LAST);

        lr_end_transaction("check_itinerary", LR_AUTO);


        lr_think_time(2);


        lr_start_transaction("logoff");

        web_image("SignOff Button",
                "Alt=SignOff Button",
                "Ordinal=1",
                "Snapshot=t8.inf",
                LAST);
        lr_output_message("The flight was booked into the Message Text box.");
        lr_error_message("An error has occurred into the Message text box.");

        lr_end_transaction("logoff", LR_AUTO);


        return 0;
[attach]41408[/attach]

[ 本帖最后由 laipi 于 2008-4-23 17:44 编辑 ]
作者: shen1936    时间: 2008-4-23 17:53
初步判断 应该是你机器的问题或者是安装的问题。
我把你的脚本切下来 回放  没有你这个错误。
作者: lihua_1268    时间: 2008-4-23 21:20
标题: 回复 1# 的帖子
很大可能是你机器的问题
作者: liangjz    时间: 2008-4-24 01:10
楼主遇上LR 的BUG 了。
内存访问地址冲突了。

楼主用的IE是什么版本?LR 打了补丁么 ?
作者: laipi    时间: 2008-4-24 10:25
用的是IE6.0  lr8.0 请问是Web Services打补丁吗?

[ 本帖最后由 laipi 于 2008-4-24 10:35 编辑 ]




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2