关联的问题?
我用LR11录制LR自带的网站,动作是登录+退出。并且设置了Set LOGIN form's action tag to an error page 为选中状态,录制完成后,回放脚本,居然没有报错,使用Scan action for correlation自动扫描需要关联的地方,但是没有结果为空。
所以接着我又录制了一份脚本,重复刚才的流程。对比两次脚本的不同地方,使用web_reg_save_param做手动关联。
运行脚本后却提示错误,是我关联错误吗?请各位帮忙看看!
Action()
{
web_reg_save_param("guanlian1",
"LB=Name=userSession", "Value=", "RB=>", LAST);
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_think_time(4);
web_custom_request("URSTelemetry.asmx",
"URL=https://telemetry.urs.microsoft.com/URSTelemetry.asmx?MSTel-Client-Key=ZyuXJp0LLlIiqo9B8VPpIw%3d%3d&MSTel-Patented-Lock=AIb1SW/uaR4%3d",
"Method=POST",
"Resource=0",
"RecContentType=text/xml",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
"EncType=text/xml; charset=utf-8",
"Body=<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\"><soap:Body><TelRep xmlns=\"http://Microsoft.Live.URSTelemetry/\"><Guid>{2CEDBFBC-DBA8-43AA-B1FD-CC8E6316E3E2}</Guid><DV>8.0.6001.9</DV><FV>8.00.6001.18669</FV><OSV>5.1.2600.3.0</OSV><CN>zh-cn</CN><PRG>{7D5A325F-7FE1-436C-A1A6-F2C88A137F16}</PRG><RType>POST</"
"RType><CID>8A1DAE66-092C-4C89-BDCD-60F5DFC35B77</CID><CTU>http://127.0.0.1/webtours</CTU><CWIp>NULL</CWIp><TUIp>127.0.0.1</TUIp><CS>64</CS><IB soapenc:arrayType=\"xsd:double\"><double>100</double><double>100</double><double>75</double><double>100</double><double>6.5</double></IB><Frames xmlns:q1=\"http://Microsoft.Live.URSTelemetry/\" soapenc:arrayType=\"q1:Frame\"><Frame><FUrl>http://127.0.0.1/webtours/welcome.pl?signOff=true</FUrl><Z>NFHN</Z><CR>D32000|0|0|20000020|1FC2|0</CR><Kwds"
">3a003a00</Kwds><UType>FRAME</UType><HIP>127.0.0.1</HIP></Frame><Frame><FUrl>http://127.0.0.1/webtours/nav.pl?in=home</FUrl><Z>KVHN</Z><CR>32D32000|2830015|0|80001064|FC0|0</CR><Kwds>3a003a00</Kwds><UType>FRAME</UType><HIP>127.0.0.1</HIP></Frame><Frame><FUrl>http://127.0.0.1/webtours</FUrl><Z>NFHN</Z><CR>D32000|0|0|20000020|1FC2|0</CR><Kwds>3a003a00</Kwds><UType>TOP</UType><HIP>127.0.0.1</HIP></Frame><Frame><FUrl>http://127.0.0.1/webtours/header.html</FUrl><Z>NQHN</Z><CR>D32000|0|0|20000020|F82|0<"
"/CR><Kwds>3a003a00</Kwds><UType>FRAME</UType><HIP>127.0.0.1</HIP></Frame><Frame><FUrl>http://127.0.0.1/webtours/home.html</FUrl><Z>NQHN</Z><CR>D32000|0|0|20000020|1FC0|0</CR><Kwds>3a00570065006c0063006f006d0065003a00</Kwds><UType>FRAME</UType><HIP>127.0.0.1</HIP></Frame></Frames></TelRep></soap:Body></soap:Envelope>",
LAST);
web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value={guanlian1}", ENDITEM,
"Name=username", "Value=mahongbin", ENDITEM,
"Name=password", "Value=mahbin000", ENDITEM,
"Name=JSFormSubmit", "Value=on", ENDITEM,
"Name=login.x", "Value=74", ENDITEM,
"Name=login.y", "Value=6", ENDITEM,
LAST);
web_custom_request("URSTelemetry.asmx_2",
"URL=https://telemetry.urs.microsoft.com/URSTelemetry.asmx?MSTel-Client-Key=/5wC2y/Q7QjLs6aTXtc9Tw%3d%3d&MSTel-Patented-Lock=H6QVRIobO30%3d",
"Method=POST",
"Resource=0",
"RecContentType=text/xml",
"Referer=",
"Snapshot=t4.inf",
"Mode=HTML",
"EncType=text/xml; charset=utf-8",
"Body=<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\"><soap:Body><TelRep xmlns=\"http://Microsoft.Live.URSTelemetry/\"><Guid>{2CEDBFBC-DBA8-43AA-B1FD-CC8E6316E3E2}</Guid><DV>8.0.6001.9</DV><FV>8.00.6001.18669</FV><OSV>5.1.2600.3.0</OSV><CN>zh-cn</CN><PRG>{7D5A325F-7FE1-436C-A1A6-F2C88A137F16}</PRG><RType>POST</"
"RType><CID>8A1DAE66-092C-4C89-BDCD-60F5DFC35B77</CID><CTU>http://127.0.0.1/webtours/login.pl?intro=true</CTU><CWIp>NULL</CWIp><TUIp>127.0.0.1</TUIp><CS>64</CS><IB soapenc:arrayType=\"xsd:double\"><double>100</double><double>100</double><double>75</double><double>100</double><double>6.5</double></IB><Frames xmlns:q1=\"http://Microsoft.Live.URSTelemetry/\" soapenc:arrayType=\"q1:Frame\"><Frame><FUrl>http://127.0.0.1/webtours/welcome.pl?signOff=true</FUrl><Z>NFHN</Z><CR>D32000|0|0|20000020|1FC2"
"|0</CR><Kwds>3a003a00</Kwds><UType>FRAME</UType><HIP>127.0.0.1</HIP></Frame><Frame><FUrl>http://127.0.0.1/webtours/nav.pl?in=home</FUrl><Z>KVHN</Z><CR>32D32000|2830015|0|80001064|FC0|0</CR><Kwds>3a003a00</Kwds><UType>FRAME</UType><HIP>127.0.0.1</HIP></Frame><Frame><FUrl>http://127.0.0.1/webtours</FUrl><Z>NFHN</Z><CR>D32000|0|0|20000020|1FC2|0</CR><Kwds>3a003a00</Kwds><UType>TOP</UType><HIP>127.0.0.1</HIP></Frame><Frame><FUrl>http://127.0.0.1/webtours/header.html</FUrl><Z>NQHN</Z><CR>D32000|0|0|"
"20000020|F82|0</CR><Kwds>3a003a00</Kwds><UType>FRAME</UType><HIP>127.0.0.1</HIP></Frame><Frame><FUrl>http://127.0.0.1/webtours/home.html</FUrl><Z>NQHN</Z><CR>D32000|0|0|20000020|1FC0|0</CR><Kwds>3a00570065006c0063006f006d0065003a00</Kwds><UType>FRAME</UType><HIP>127.0.0.1</HIP></Frame><Frame><FUrl>http://127.0.0.1/webtours/login.pl?intro=true</FUrl><Z>NQHN</Z><CR>D32000|0|0|20000020|1FC0|0</CR><Kwds>570065006c0063006f006d0065003a00570065006c0063006f006d0065003a00</Kwds><UType>TOP</UType><HIP"
">127.0.0.1</HIP></Frame></Frames></TelRep></soap:Body></soap:Envelope>",
LAST);
web_url("welcome.pl",
"URL=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=1",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",
"Snapshot=t5.inf",
"Mode=HTML",
LAST);
web_custom_request("URSTelemetry.asmx_3",
"URL=https://telemetry.urs.microsoft.com/URSTelemetry.asmx?MSTel-Client-Key=8Tml32MPa/LzxOJFrsSR7g%3d%3d&MSTel-Patented-Lock=J4hKFqM84Gc%3d",
"Method=POST",
"Resource=0",
"RecContentType=text/xml",
"Referer=",
"Snapshot=t6.inf",
"Mode=HTML",
"EncType=text/xml; charset=utf-8",
"Body=<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\"><soap:Body><TelRep xmlns=\"http://Microsoft.Live.URSTelemetry/\"><Guid>{2CEDBFBC-DBA8-43AA-B1FD-CC8E6316E3E2}</Guid><DV>8.0.6001.9</DV><FV>8.00.6001.18669</FV><OSV>5.1.2600.3.0</OSV><CN>zh-cn</CN><PRG>{7D5A325F-7FE1-436C-A1A6-F2C88A137F16}</PRG><RType>POST</"
"RType><CID>8A1DAE66-092C-4C89-BDCD-60F5DFC35B77</CID><CTU>http://127.0.0.1/webtours</CTU><CWIp>NULL</CWIp><TUIp>127.0.0.1</TUIp><CS>64</CS><IB soapenc:arrayType=\"xsd:double\"><double>100</double><double>100</double><double>75</double><double>100</double><double>6.5</double></IB><Frames xmlns:q1=\"http://Microsoft.Live.URSTelemetry/\" soapenc:arrayType=\"q1:Frame\"><Frame><FUrl>http://127.0.0.1/webtours/welcome.pl?signOff=true</FUrl><Z>NFHN</Z><CR>D32000|0|0|20000020|1FC2|0</CR><Kwds"
">3a003a00</Kwds><UType>FRAME</UType><HIP>127.0.0.1</HIP></Frame><Frame><FUrl>http://127.0.0.1/webtours/nav.pl?in=home</FUrl><Z>KVHN</Z><CR>32D32000|2830015|0|80001064|FC0|0</CR><Kwds>3a003a00</Kwds><UType>FRAME</UType><HIP>127.0.0.1</HIP></Frame><Frame><FUrl>http://127.0.0.1/webtours</FUrl><Z>NFHN</Z><CR>D32000|0|0|20000020|1FC2|0</CR><Kwds>3a003a00</Kwds><UType>TOP</UType><HIP>127.0.0.1</HIP></Frame><Frame><FUrl>http://127.0.0.1/webtours/header.html</FUrl><Z>NQHN</Z><CR>D32000|0|0|20000020|F82|0<"
"/CR><Kwds>3a003a00</Kwds><UType>FRAME</UType><HIP>127.0.0.1</HIP></Frame><Frame><FUrl>http://127.0.0.1/webtours/home.html</FUrl><Z>NQHN</Z><CR>D32000|0|0|20000020|1FC0|0</CR><Kwds>3a00570065006c0063006f006d0065003a00</Kwds><UType>FRAME</UType><HIP>127.0.0.1</HIP></Frame><Frame><FUrl>http://127.0.0.1/webtours/login.pl?intro=true</FUrl><Z>NQHN</Z><CR>D32000|0|0|20000020|1FC0|0</CR><Kwds>570065006c0063006f006d0065003a00570065006c0063006f006d0065003a00</Kwds><UType>FRAME</UType><HIP>127.0.0.1</HIP></"
"Frame><Frame><FUrl>http://127.0.0.1/webtours/login.pl</FUrl><Z>NFHN</Z><CR>D32000|0|0|20000020|1FC2|0</CR><Kwds>3a003a00</Kwds><UType>FRAME</UType><HIP>127.0.0.1</HIP></Frame><Frame><FUrl>http://127.0.0.1/webtours/nav.pl?page=menu&in=home</FUrl><Z>NQHN</Z><CR>D32000|0|0|20000020|FC2|0</CR><Kwds>3a003a00</Kwds><UType>FRAME</UType><HIP>127.0.0.1</HIP></Frame></Frames></TelRep></soap:Body></soap:Envelope>",
LAST);
return 0;
} 提示什么错误? web_reg_save_param用法不对,好好看看帮助文档! "LB=Name=userSession", "Value=", "RB=>", LAST);
这里面的用法不正确,看看关联函数的格式。 回复 3# mystic
"LB=Name=userSession Value=", "RB=>", LAST);
这样对吧。。 回复 4# liuting0589
"LB=Name=userSession Value=", "RB=>", LAST);
这样对吧。。 回复 4# liuting0589
"LB=Name=userSession Value=", "RB=>", LAST);
这样对吧。。
郁闷啊。又报了个错误
vuser_init.c(18): Error -26377: No match found for the requested parameter "guanlian1". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size vuser_init.c(18): Error -26377: No match found for the requested parameter "guanlian1". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size 函数里面的“要用\进行转意,
正确的写法是
"LB=Name=userSession Value=\", \"RB=>", LAST); 这样的代码看着就晕了 LB=Name=userSession。。。。。这LB取的也太那个了吧 回复 11# lwtazt
小白啊,求指教 回复 9# mystic
谢谢 回复 11# lwtazt
刚学啊,各种小白,如果知道的话还求指教,明示啊。 回复 11# lwtazt
刚学啊,各种小白,如果知道的话还求指教,明示啊。 回复 11# lwtazt
刚学啊,各种小白,如果知道的话还求指教,明示啊。 哎,都是来围观的! 回复 17# mhb430723
哈哈。mhb我经常用这个做开头 不厚道 LB错了,你可以看回放日志,把回放日志该为扩展模式。
web_reg_save_param("guanlian1",
"LB=userSession value=",
"RB=>",
LAST);
页:
[1]