试用FP4中的web(click and script)协议(简单的录制)

今天把FP4装上了,随便看了一下。
刚开始让我重启,我就不想重启,结果一打开vugen就报了错。哈哈。
重启后可以启动了。但是,请注重!!!controller不能用了!!
为了表示不是危言耸听。
如下图:



以下是官方的release:

Web (Click and Script)
Supports applications in all languages.
Supports recording on Windows 2003.
Provides limited applet support.
Provides enhanced API for verifications (check points) and for easier scripting.
Includes many enhancements and bug fixes, especially for AJAX applications, recording engine and replay snapshots.

以下是release中对此协议局限性的描述。

Web (Click and Script)
    • Records and emulates on Internet Explorer version 6 only
    • Does not support VBScript
    • Does not support user actions on ActiveX objects and Macromedia Flash
    • Supports only English language applications
    • Scalability is lower than the Web HTML protocol
    • Replay snapshots may differ slightly from the actual Web page
    • Support of right-to-left languages is limited (e.g., bi-directional or reversed text may not be processed as expected)
    • Recording of an application in a specific language (e.g., French, Japanese) must be performed in a machine whose default locale (in Settings > Control Panel > Regional Options) is the same language
    • Load generator machines must have exactly the same default locale as the recording machine
    • UNIX load generator machines are not supported for locales other than U.S. English


 



下面,我是做了一个简单的脚本录制。
来看一下,这个协议是不是比较好玩。

操作:
1,打开浏览器,输入URL:http://blog.csdn.net/zeeslo
2,点击一个文章的名字。
3,再回到首页。

下面是web(click and script)的脚本:

Action()
{

        web_add_cookie_ex("Cookie=__utma=74049089.468858712.1181003789.1181003789.1181003789.1; domain=blog.csdn.net; path=/", ENDITEM,
                "Cookie=__utmz=74049089.1181003789.1.1.utmccn=(referral)|utmcsr=dev.csdn.net|utmcct=/article/79/79538.shtm|utmcmd=referral; domain=blog.csdn.net; path=/", ENDITEM,
                "Cookie=CommentUser=Name=zeeslo; domain=blog.csdn.net; path=/", ENDITEM,
                "Cookie=cnt_uid_www=ae08b49f3fea71565f5cfa29c72be597; domain=csdn.net; path=/", ENDITEM,
                "Cookie=CsdnWebIMHasMessage=false; domain=csdn.net; path=/", ENDITEM,
                "Cookie=ABCDEF=ARgi0lhqN4TbeeDFk52ih%252f3msVh2wYSOv5PiT7tvIqxM9jgk0qfdokjpY1EGfU1GPIqAasi3jq20eeZ9s5NXEB2A77JfwjUEAQE1O5%252flsq5xlxRQ7rR6cyGLa0Ky72SgrXUFi2afeC0%253d; domain=csdn.net; path=/", ENDITEM,
                "Cookie=QWERTOP=3468; domain=csdn.net; path=/", ENDITEM,
                "Cookie=UserName=zeeslo; domain=csdn.net; path=/", ENDITEM,
                "Cookie=activeUserName=zeeslo; domain=csdn.net; path=/", ENDITEM,
                LAST);

        web_browser("zeeslo",
                DESCRIPTION,
                ACTION,
                "Navigate=http://blog.csdn.net/zeeslo",
                LAST);

        lr_think_time(4);

        web_text_link("解释LR controller里的error output",
                "Snapshot=t3.inf",
                DESCRIPTION,
                "Text=解释LR controller里的error output",
                ACTION,
                "UserAction=Click",
                LAST);

        lr_think_time(9);

        web_text_link("我的首页",
                "Snapshot=t4.inf",
                DESCRIPTION,
                "Text=我的首页",
                ACTION,
                "UserAction=Click",
                LAST);

        web_browser("Sync",
                "Snapshot=t5.inf",
                DESCRIPTION,
                ACTION,
                "Sync",
                LAST);

        return 0;
}


大家看看是不是很好懂??

下面是web(HTTP/html)协议录制的脚本:

Action()
{

        web_add_cookie("cnt_uid_www=ae08b49f3fea71565f5cfa29c72be597; DOMAIN=blog.csdn.net");

        web_add_cookie("CsdnWebIMHasMessage=false; DOMAIN=blog.csdn.net");

        web_add_cookie("ABCDEF=ARgi0lhqN4TbeeDFk52ih%252f3msVh2wYSOv5PiT7tvIqxM9jgk0qfdokjpY1EGfU1GPIqAasi3jq20eeZ9s5NXEB2A77JfwjUEAQE1O5%252flsq5xlxRQ7rR6cyGLa0Ky72SgrXUFi2afeC0%253d; DOMAIN=blog.csdn.net");

        web_add_cookie("QWERTOP=3468; DOMAIN=blog.csdn.net");

        web_add_cookie("UserName=zeeslo; DOMAIN=blog.csdn.net");

        web_add_cookie("activeUserName=zeeslo; DOMAIN=blog.csdn.net");

        web_add_cookie("__utma=74049089.468858712.1181003789.1181003789.1181003789.1; DOMAIN=blog.csdn.net");

        web_add_cookie("__utmz=74049089.1181003789.1.1.utmccn=(referral)|utmcsr=dev.csdn.net|utmcct=/article/79/79538.shtm|utmcmd=referral; DOMAIN=blog.csdn.net");

        web_add_cookie("CommentUser=Name=zeeslo; DOMAIN=blog.csdn.net");

        web_add_cookie("cnt_uid_www=ae08b49f3fea71565f5cfa29c72be597; DOMAIN=counter.csdn.net");

        web_add_cookie("CsdnWebIMHasMessage=false; DOMAIN=counter.csdn.net");

        web_add_cookie("ABCDEF=ARgi0lhqN4TbeeDFk52ih%252f3msVh2wYSOv5PiT7tvIqxM9jgk0qfdokjpY1EGfU1GPIqAasi3jq20eeZ9s5NXEB2A77JfwjUEAQE1O5%252flsq5xlxRQ7rR6cyGLa0Ky72SgrXUFi2afeC0%253d; DOMAIN=counter.csdn.net");

        web_add_cookie("QWERTOP=3468; DOMAIN=counter.csdn.net");

        web_add_cookie("UserName=zeeslo; DOMAIN=counter.csdn.net");

        web_add_cookie("activeUserName=zeeslo; DOMAIN=counter.csdn.net");

        web_url("zeeslo",
                "URL=http://blog.csdn.net/zeeslo",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=/skins/Valentine/images/bg.gif", ENDITEM,
                "Url=/skins/Valentine/images/bg_leftcontent.jpg", ENDITEM,
                "Url=/skins/Valentine/images/bg_menu.gif", ENDITEM,
                "Url=http://counter.csdn.net/pv.aspx?id=26", ENDITEM,
                "Url=/skins/Valentine/images/bg_footer.jpg", ENDITEM,
                LAST);

        web_url("NewCount.aspx",
                "URL=http://blog.csdn.net/NewCount.aspx?FeedbackCountStack=1631350,1602950,1575701,1549704,1549702,1543770,1543563,1541714,1537711,1521056,1501781,1500084,1498076,1444792,1396400,1380775,1372237,1361431,1347558,1341536,1329999,1289991,1240148,1232574,1180356,1109926,1106855,1106845,1106837,1106824,1106820,1059187,960841,896292,834106,",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://blog.csdn.net/zeeslo",
                "Snapshot=t2.inf",
                "Mode=HTML",
                LAST);

        lr_think_time(13);

        web_url("1575701.aspx",
                "URL=http://blog.csdn.net/zeeslo/archive/2007/04/23/1575701.aspx",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://blog.csdn.net/zeeslo",
                "Snapshot=t3.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=/WebResource.axd?d=1wkz58Z1rsBL-eFHJPld5ERhyO-4qXtUzHp7Q1KwrOE1&t=632963535947587500", ENDITEM,
                "Url=http://counter.csdn.net/pv.aspx?id=24", ENDITEM,
                LAST);

        web_add_cookie("cnt_uid_www=ae08b49f3fea71565f5cfa29c72be597; DOMAIN=tagegg.csdn.net");

        web_add_cookie("CsdnWebIMHasMessage=false; DOMAIN=tagegg.csdn.net");

        web_add_cookie("ABCDEF=ARgi0lhqN4TbeeDFk52ih%252f3msVh2wYSOv5PiT7tvIqxM9jgk0qfdokjpY1EGfU1GPIqAasi3jq20eeZ9s5NXEB2A77JfwjUEAQE1O5%252flsq5xlxRQ7rR6cyGLa0Ky72SgrXUFi2afeC0%253d; DOMAIN=tagegg.csdn.net");

        web_add_cookie("QWERTOP=3468; DOMAIN=tagegg.csdn.net");

        web_add_cookie("UserName=zeeslo; DOMAIN=tagegg.csdn.net");

        web_add_cookie("activeUserName=zeeslo; DOMAIN=tagegg.csdn.net");

        web_url("a.aspx",
                "URL=http://tagegg.csdn.net/a.aspx?action=displayad&unionuser=19&unionurl=http%3A%2F%2Fblog.csdn.net%2Fzeeslo%2Farchive%2F2007%2F04%2F23%2F1575701.aspx&adcss=2&ad_type=j&width=468&height=60&ad_color=&ad_color_border=&count=5",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://blog.csdn.net/zeeslo/archive/2007/04/23/1575701.aspx",
                "Snapshot=t4.inf",
                "Mode=HTML",
                LAST);

        lr_think_time(17);

        web_url("zeeslo_2",
                "URL=http://blog.csdn.net/zeeslo/",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://blog.csdn.net/zeeslo/archive/2007/04/23/1575701.aspx",
                "Snapshot=t5.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=http://counter.csdn.net/pv.aspx?id=26", ENDITEM,
                LAST);

        web_url("NewCount.aspx_2",
                "URL=http://blog.csdn.net/NewCount.aspx?FeedbackCountStack=1631350,1602950,1575701,1549704,1549702,1543770,1543563,1541714,1537711,1521056,1501781,1500084,1498076,1444792,1396400,1380775,1372237,1361431,1347558,1341536,1329999,1289991,1240148,1232574,1180356,1109926,1106855,1106845,1106837,1106824,1106820,1059187,960841,896292,834106,",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://blog.csdn.net/zeeslo/",
                "Snapshot=t6.inf",
                "Mode=HTML",
                LAST);

        return 0;
}


大家看看。这两个脚本的差距还是比较明显的。
新加入的协议的可读性增加了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值