|
4#
楼主 |
发表于 2007-7-12 15:08:33
|
只看该作者
这是同一个transaction的,我想把登陆和操作分开就不行了
原文如下:
//------------------------------------------------------------
// Recorded 01/03/2007 by SilkPerformer Recorder v7.4.0.2776
//----------------------------------------------------------------------
benchmark SilkPerformerRecorder
use "WebAPI.bdh"
dclparam
sParseDataVar1 : string;
dcluser
user
VUser
transactions
TInit : begin;
TMain : 1;
var
dclrand
dcltrans
transaction TInit
begin
WebSetBrowser(WEB_BROWSER_MSIE6);
WebModifyHttpHeader("Accept-Language", "zh-cn");
//WebSetUserBehavior(WEB_USERBEHAVIOR_FIRST_TIME);
//WebSetDocumentCache(true, WEB_CACHE_CHECK_SESSION);
end TInit;
transaction TMain
var
begin
WebCookieSet("lastProductForUser23=4; domain=192.168.61.112; path=/; expires=Tue, 03 Jan 2017 06:56:14 GMT",
"http://192.168.61.112/");
WebPageParseUrl("Javascript Redirection in page Unnamed page", "href='", "'", WEB_FLAG_IGNORE_WHITE_SPACE);
WebPageUrl("http://192.168.61.112/", "Unnamed page");
WebPageAddUrl("gui/css/tl_login.css");
WebPageAddUrl("gui/css/tl_print.css");
WebPageLink("Javascript Redirection in page Unnamed page", "TestLink - Login");
WebPageParseUrl("Javascript Redirection in page index.php", "href='", "'", WEB_FLAG_IGNORE_WHITE_SPACE);
ThinkTime(7.0);
WebParseDataBoundEx(sParseDataVar1, STRING_COMPLETE, "PHPSESSID=", 1, ";",
WEB_FLAG_IGNORE_WHITE_SPACE | WEB_FLAG_CASE_SENSITIVE | WEB_FLAG_HEADER_ONLY, 1);
WebPageSubmit("Login", LOGIN001, "index.php"); // Form 1
Print("sParseDataVar1: " + sParseDataVar1);
WebPageAddUrl("gui/css/testlink.css");
WebPageAddUrl("icons/navbar.gif");
WebPageLink("Javascript Redirection in page index.php", "TestLink 1.6.2"); // Link 1
WebPageAddUrl("/third_party/phplayersmenu/layerstreemenu-hidden.css");
WebPageAddUrl("/third_party/phplayersmenu/menuimages/tree_expand_corner_first.png");
WebPageAddUrl("/third_party/phplayersmenu/menuimages/tree_folder_closed.png");
WebCookieSet("phplm_expand=; domain=192.168.61.112; path=/; expires=Tue, 03 Jan 2017 06:56:27 GMT",
"http://192.168.61.112/third_party/phplayersmenu/menuimages/tree_expand_corner.png", 3);
WebCookieSet("phplm_collapse=1|2|3|; domain=192.168.61.112; path=/; expires=Tue, 03 Jan 2017 06:56:27 GMT",
"http://192.168.61.112/third_party/phplayersmenu/menuimages/tree_expand_corner.png", 3);
WebPageAddUrl("/third_party/phplayersmenu/menuimages/tree_expand_corner.png");
ThinkTime(3.8);
WebPageLink("测试规范", "TestLink Inner Frame", 1, "titlebar"); // Link 3
ThinkTime(6.6);
WebPageLink("用户管理", "TestLink", 1, "titlebar"); // Link 4
ThinkTime(3.0);
WebPageLink("修改用户", "TestLink (#1)", 1, "mainframe"); // Link 7
ThinkTime(5.5);
WebPageLink("删除用户", "TestLink (#2)", 1, "mainframe"); // Link 8
ThinkTime(2.6);
WebPageLink("用户手册", "User Manual", 1, "titlebar"); // Link 6
end TMain;
dclform
LOGIN001:
"login" := "admin", // changed
"password" := Decrypt("5ERzHMY="), // changed
"submit" := "" <USE_HTML_VAL> ; // unchanged, value: "Login"
[ 本帖最后由 testlike 于 2007-7-12 15:09 编辑 ] |
|