周苏 发表于 2016-9-20 22:47:19

LR录制时事物里没有脚本,但是事物之外都有脚本,求原因

本人使用LR11.0录制脚本,录制过程中在Action里插入两个事物,一个是“login”,一个是“search”,但是不知道为什么,“search”里没有脚本,但“login”里就有。
操作系统:win7,IE8。在html和url下都试过,都没有脚本。注:由于发帖有长度限制,所以脚本我删除了写部分,原本会比这个长很多。
以下是脚本请大神帮看看:这是html下录制的
Action()
{

    web_url("default.jsp",
      "URL=http://192.168.1.100:9000/evm/loginTo/default.jsp",
      "Resource=0",
      "RecContentType=text/html",
      "Referer=",
      "Snapshot=t1.inf",
      "Mode=HTML",
      
      LAST);

    web_url("login.jsp",
      "URL=http://192.168.1.100:9000/evm/loginTo/workbench/login.jsp?rnd=0.19001930245101922",
      "Resource=0",
      "RecContentType=text/html",
      "Referer=http://192.168.1.100:9000/evm/loginTo/default.jsp",
      "Snapshot=t2.inf",
      "Mode=HTML",
      LAST);

    lr_start_transaction("login");

    web_custom_request("validate",
      "URL=http://192.168.1.100:9000/evm/iscintegrate/rest/common/loginuser/validate?rnd=0.2646557110074934",
      "Method=POST",
      "Resource=0",
      "RecContentType=application/json",
      "Referer=http://192.168.1.100:9000/evm/loginTo/default.jsp",
      "Snapshot=t3.inf",
      "Mode=HTML",
      "EncType=application/json",
      "Body={\"params\":{\"userName\":\"zl\",\"password\":\"efe5f492d66028e364d88dd0e0db3626\"}}",
      LAST);

    lr_end_transaction("login",LR_AUTO);

    web_url("index.jsp",
      "URL=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364",
      "Resource=0",
      "RecContentType=text/html",
      "Referer=http://192.168.1.100:9000/evm/loginTo/default.jsp",
      "Snapshot=t4.inf",
      "Mode=HTML",
      EXTRARES,
      "Url=scripts/weblet.js", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=scripts/views/MainViewController.js", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=resources/locales/zh_CN/messages.js", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=scripts/views/MainView.js", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=resources/css/expertSignIn.css", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=resources/img/linkman.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=resources/img/time.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=resources/img/site.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=../rest/eexperttasksign/getExperts/task/null?rnd=0.442307750483315&_=1474334214943", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=/evm/mx/resources/themes/aero/images/drop_down_button_bg.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=/evm/mx/resources/themes/aero/images/data_grid_head_bg.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=/evm/mx/resources/themes/aero/images/pagenavibar_previousPage.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=/evm/mx/resources/themes/aero/images/pagenavibar_nextPage.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=/evm/mx/resources/themes/aero/images/button_active.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=/evm/mx/resources/themes/aero/images/pagenavibar_firstPage.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=/evm/mx/resources/themes/aero/images/pagenavibar_lastPage.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=/evm/mx/resources/themes/aero/images/pagenavibar_refresh.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=../rest/eexperttasksign/querySignInByExpert/%7B%22items%22:[%7B%22taskId%22:%22ca8ae0ea46f5481bb80c6bc1f668c9a1%22,%22searchFashion%22:%22expert%22,%22time%22:null,%22expert%22:null,%22state%22:null%7D]%7D?rnd=0.2192632580960126&params=%7B%22columns%22%3A%22id%2CexpertName%2CunitName%2CsignStartDay%2CsignDays%2CsignEndDay%2CtaskState%2CtaskId%22%2C%22pageIndex%22%3A1%2C%22pageSize%22%3A20%7D&_=1474334218640", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id="
      "M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=/evm/mx/resources/themes/aero/images/calendar_button_bg.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=/evm/mx/resources/themes/aero/images/pagenavibar_firstPage_disabled.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=/evm/mx/resources/themes/aero/images/pagenavibar_previousPage_disabled.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=/evm/mx/resources/themes/aero/images/pagenavibar_lastPage_disabled.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=/evm/mx/resources/themes/aero/images/pagenavibar_nextPage_disabled.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=/evm/mx/resources/themes/aero/images/deleteContainer_but.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=/evm/mx/resources/themes/aero/images/button_bg.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
      "Url=../rest/eexperttasksign/querySignInByExpert/%7B%22items%22:[%7B%22taskId%22:%221684744b5707490dbafcd65d761c6e7b%22,%22searchFashion%22:%22expert%22,%22time%22:null,%22expert%22:null,%22state%22:null%7D]%7D?rnd=0.9189602636882137&params=%7B%22columns%22%3A%22id%2CexpertName%2CunitName%2CsignStartDay%2CsignDays%2CsignEndDay%2CtaskState%2CtaskId%22%2C%22pageIndex%22%3A1%2C%22pageSize%22%3A20%7D&_=1474334229092", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id="
      "M00000014&rnd=0.15398777873437364", ENDITEM,
      LAST);

    lr_start_transaction("search");

    lr_end_transaction("search",LR_AUTO);

    return 0;
}

菜鸟@大虾 发表于 2016-9-21 14:32:05

请同学贴下你的Search操作时的抓包信息

周苏 发表于 2016-9-21 20:48:20

菜鸟@大虾 发表于 2016-9-21 14:32
请同学贴下你的Search操作时的抓包信息

怎么抓包,我不会,我是刚学会用的。谢谢指教!

jingzizx 发表于 2016-9-21 23:08:55

确保search有协议操作

周苏 发表于 2016-9-22 15:25:53

jingzizx 发表于 2016-9-21 23:08
确保search有协议操作

录制时,事件条上的数字一直都有变化的。这算是有协议操作吗?

菜鸟@大虾 发表于 2016-9-23 14:19:06

周苏 发表于 2016-9-21 20:48
怎么抓包,我不会,我是刚学会用的。谢谢指教!

你可以安装下HttpWatch或者 直接开启Fiddler,然后 你要操作下你的Search事务中的步骤

周苏 发表于 2016-9-25 09:00:28

菜鸟@大虾 发表于 2016-9-23 14:19
你可以安装下HttpWatch或者 直接开启Fiddler,然后 你要操作下你的Search事务中的步骤

好的,谢谢!
页: [1]
查看完整版本: LR录制时事物里没有脚本,但是事物之外都有脚本,求原因