|
我用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[5]\"><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[5]\"><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[5]\"><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[6]\"><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[5]\"><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[8]\"><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;
} |
|