51Testing软件测试论坛
标题:
两个脚本相同动作的脚本。帮我做做关联吧
[打印本页]
作者:
让测试飞起来
时间:
2013-7-20 10:14
标题:
两个脚本相同动作的脚本。帮我做做关联吧
本帖最后由 让测试飞起来 于 2013-7-20 10:16 编辑
两个相同动作的脚本,回放都不成功
网址是
www.ejbuy.com
要是可以的话,帮录制一个登录的,回放可以成功 !
录制了两个脚本 相同动作的
Action()
{
web_url("www.ejbuy.com",
"URL=http://www.ejbuy.com/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=/skin/frontend/first/default/images/index_bg.gif", ENDITEM,
"Url=/skin/frontend/first/default/images/top_sc.png", ENDITEM,
"Url=/skin/frontend/first/default/images/topbg.png", ENDITEM,
"Url=/skin/frontend/first/default/images/menu_bg.png", ENDITEM,
"Url=/skin/frontend/first/default/images/menu_s.png", ENDITEM,
"Url=/skin/frontend/first/default/images/focus_bg.jpg", ENDITEM,
"Url=/skin/frontend/first/default/images/menu_tel.png", ENDITEM,
"Url=/skin/frontend/first/default/images/en_tools.gif", ENDITEM,
"Url=http://www.google-analytics.com/analytics.js", ENDITEM,
"Url=/skin/frontend/first/default/images/new_tui_tbg.png", ENDITEM,
"Url=/skin/frontend/first/default/images/new_tui_active_20.png", ENDITEM,
"Url=/skin/frontend/first/default/images/focus_01_link_bg.gif", ENDITEM,
"Url=/skin/frontend/first/default/images/sale.png", ENDITEM,
"Url=/skin/frontend/first/default/images/csico.gif", ENDITEM,
"Url=/skin/frontend/first/default/images/help2.png", ENDITEM,
"Url=/skin/frontend/first/default/images/help4.png", ENDITEM,
"Url=http://www.google-analytics.com/collect?v=1&_v=j10&a=349649142&t=pageview&_s=1&dl=http%3A%2F%2Fwww.ejbuy.com%2F&ul=zh-cn&de=utf-8&dt=Ejbuy%20Mall%20Shipping%20Worldwide%2C%20easy%20just%20buy%20in%20home&sd=24-bit&sr=1920x1080&vp=1903x985&je=1&fl=11.8%20r800&_u=ME~&cid=1620755610.1374284713&tid=UA-42302542-1&z=1247327933", ENDITEM,
LAST);
web_url("getItemsSummaryQty",
"URL=http://www.ejbuy.com/en/checkout/cart/getItemsSummaryQty/?_=1374284712529",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.ejbuy.com/",
"Snapshot=t2.inf",
"Mode=HTML",
LAST);
web_url("getItemsTotop",
"URL=http://www.ejbuy.com/en/checkout/cart/getItemsTotop/?_=1374284712496",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.ejbuy.com/",
"Snapshot=t3.inf",
"Mode=HTML",
LAST);
web_add_cookie("_ga=GA1.2.1620755610.1374284713; DOMAIN=www.ejbuy.com");
web_url("login",
"URL=http://www.ejbuy.com/en/customer/account/login/",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.ejbuy.com/",
"Snapshot=t4.inf",
"Mode=HTML",
EXTRARES,
"Url=http://www.google-analytics.com/collect?v=1&_v=j10&a=201972175&t=pageview&_s=1&dl=http%3A%2F%2Fwww.ejbuy.com%2Fen%2Fcustomer%2Faccount%2Flogin%2F&ul=zh-cn&de=utf-8&dt=Magento%20Commerce&sd=24-bit&sr=1920x1080&vp=1920x985&je=1&fl=11.8%20r800&_u=MAC~&cid=1620755610.1374284713&tid=UA-42302542-1&z=532095603", ENDITEM,
"Url=/skin/frontend/first/default/images/help4.png", ENDITEM,
"Url=/skin/frontend/first/default/images/csico.gif", ENDITEM,
"Url=/skin/frontend/first/default/images/top_sc.png", ENDITEM,
"Url=/skin/frontend/first/default/images/help2.png", ENDITEM,
"Url=/skin/frontend/first/default/images/topbg.png", ENDITEM,
"Url=/skin/frontend/first/default/images/index_bg.gif", ENDITEM,
LAST);
lr_think_time(11);
web_submit_data("loginpost",
"Action=http://www.ejbuy.com/en/customer/account/loginpost/",
"Method=POST",
"RecContentType=application/json",
"Referer=http://www.ejbuy.com/en/customer/account/login/",
"Snapshot=t5.inf",
"Mode=HTML",
"EncodeAtSign=YES",
ITEMDATA,
"Name=email", "Value=1300115774@qq.com", ENDITEM,
"Name=password", "Value=8639304", ENDITEM,
LAST);
web_reg_find("Text=1300115774@qq.com",
LAST);
web_url("index",
"URL=http://www.ejbuy.com/en/customer/account/index/",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.ejbuy.com/en/customer/account/login/",
"Snapshot=t6.inf",
"Mode=HTML",
EXTRARES,
"Url=/skin/frontend/first/default/images/index_bg.gif", ENDITEM,
"Url=/skin/frontend/first/default/images/top_sc.png", ENDITEM,
"Url=/skin/frontend/first/default/images/topbg.png", ENDITEM,
"Url=http://www.google-analytics.com/analytics.js", ENDITEM,
"Url=/skin/frontend/first/default/images/help4.png", ENDITEM,
"Url=/skin/frontend/first/default/images/csico.gif", ENDITEM,
"Url=/skin/frontend/first/default/images/help2.png", ENDITEM,
"Url=/skin/frontend/first/default/images/menu_tel.png", ENDITEM,
"Url=/skin/frontend/first/default/images/menu_s.png", ENDITEM,
"Url=/skin/frontend/first/default/images/menu_bg.png", ENDITEM,
"Url=http://www.google-analytics.com/collect?v=1&_v=j10&a=1942644375&t=pageview&_s=1&dl=http%3A%2F%2Fwww.ejbuy.com%2Fen%2Fcustomer%2Faccount%2Findex%2F&ul=zh-cn&de=utf-8&dt=My%20Account&sd=24-bit&sr=1920x1080&vp=1920x985&je=1&fl=11.8%20r800&_u=MAC~&cid=1620755610.1374284713&tid=UA-42302542-1&z=834350390", ENDITEM,
LAST);
web_url("getItemsSummaryQty_2",
"URL=http://www.ejbuy.com/en/checkout/cart/getItemsSummaryQty/?_=1374284729494",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.ejbuy.com/en/customer/account/index/",
"Snapshot=t7.inf",
"Mode=HTML",
LAST);
web_url("getItemsTotop_2",
"URL=http://www.ejbuy.com/en/checkout/cart/getItemsTotop/?_=1374284729492",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.ejbuy.com/en/customer/account/index/",
"Snapshot=t8.inf",
"Mode=HTML",
LAST);
return 0;
}
复制代码
第二
作者:
让测试飞起来
时间:
2013-7-20 10:15
Action()
{
web_url("www.ejbuy.com",
"URL=http://www.ejbuy.com/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=/skin/frontend/first/default/images/topbg.png", ENDITEM,
"Url=/skin/frontend/first/default/images/top_sc.png", ENDITEM,
"Url=/skin/frontend/first/default/images/index_bg.gif", ENDITEM,
"Url=/skin/frontend/first/default/images/menu_bg.png", ENDITEM,
"Url=/skin/frontend/first/default/images/menu_tel.png", ENDITEM,
"Url=http://www.google-analytics.com/analytics.js", ENDITEM,
"Url=/skin/frontend/first/default/images/en_tools.gif", ENDITEM,
"Url=/skin/frontend/first/default/images/new_tui_tbg.png", ENDITEM,
"Url=/skin/frontend/first/default/images/new_tui_active_20.png", ENDITEM,
"Url=/skin/frontend/first/default/images/sale.png", ENDITEM,
"Url=/skin/frontend/first/default/images/focus_01_link_bg.gif", ENDITEM,
"Url=/skin/frontend/first/default/images/focus_bg.jpg", ENDITEM,
"Url=/skin/frontend/first/default/images/menu_s.png", ENDITEM,
"Url=http://www.google-analytics.com/collect?v=1&_v=j10&a=650850901&t=pageview&_s=1&dl=http%3A%2F%2Fwww.ejbuy.com%2F&ul=zh-cn&de=utf-8&dt=Ejbuy%20Mall%20Shipping%20Worldwide%2C%20easy%20just%20buy%20in%20home&sd=24-bit&sr=1920x1080&vp=1903x985&je=1&fl=11.8%20r800&_u=ME~&cid=2033167953.1374285368&tid=UA-42302542-1&z=1073508943", ENDITEM,
"Url=/skin/frontend/first/default/images/help2.png", ENDITEM,
"Url=/skin/frontend/first/default/images/csico.gif", ENDITEM,
"Url=/skin/frontend/first/default/images/help4.png", ENDITEM,
LAST);
web_url("getItemsSummaryQty",
"URL=http://www.ejbuy.com/en/checkout/cart/getItemsSummaryQty/?_=1374285368138",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.ejbuy.com/",
"Snapshot=t2.inf",
"Mode=HTML",
LAST);
web_url("getItemsTotop",
"URL=http://www.ejbuy.com/en/checkout/cart/getItemsTotop/?_=1374285368104",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.ejbuy.com/",
"Snapshot=t3.inf",
"Mode=HTML",
LAST);
web_add_cookie("_ga=GA1.2.2033167953.1374285368; DOMAIN=www.ejbuy.com");
web_url("login",
"URL=http://www.ejbuy.com/en/customer/account/login/",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.ejbuy.com/",
"Snapshot=t4.inf",
"Mode=HTML",
EXTRARES,
"Url=http://www.google-analytics.com/collect?v=1&_v=j10&a=376838312&t=pageview&_s=1&dl=http%3A%2F%2Fwww.ejbuy.com%2Fen%2Fcustomer%2Faccount%2Flogin%2F&ul=zh-cn&de=utf-8&dt=Magento%20Commerce&sd=24-bit&sr=1920x1080&vp=1920x985&je=1&fl=11.8%20r800&_u=MAC~&cid=2033167953.1374285368&tid=UA-42302542-1&z=279210933", ENDITEM,
"Url=/skin/frontend/first/default/images/help4.png", ENDITEM,
"Url=/skin/frontend/first/default/images/csico.gif", ENDITEM,
"Url=/skin/frontend/first/default/images/help2.png", ENDITEM,
"Url=/skin/frontend/first/default/images/index_bg.gif", ENDITEM,
"Url=/skin/frontend/first/default/images/topbg.png", ENDITEM,
"Url=/skin/frontend/first/default/images/top_sc.png", ENDITEM,
LAST);
web_submit_data("loginpost",
"Action=http://www.ejbuy.com/en/customer/account/loginpost/",
"Method=POST",
"RecContentType=application/json",
"Referer=http://www.ejbuy.com/en/customer/account/login/",
"Snapshot=t5.inf",
"Mode=HTML",
"EncodeAtSign=YES",
ITEMDATA,
"Name=email", "Value=1300115774@qq.com", ENDITEM,
"Name=password", "Value=8639304", ENDITEM,
LAST);
web_reg_find("Text=1300115774@qq.com",
LAST);
web_url("index",
"URL=http://www.ejbuy.com/en/customer/account/index/",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.ejbuy.com/en/customer/account/login/",
"Snapshot=t6.inf",
"Mode=HTML",
EXTRARES,
"Url=/skin/frontend/first/default/images/index_bg.gif", ENDITEM,
"Url=/skin/frontend/first/default/images/top_sc.png", ENDITEM,
"Url=/skin/frontend/first/default/images/topbg.png", ENDITEM,
"Url=http://www.google-analytics.com/collect?v=1&_v=j10&a=323448730&t=pageview&_s=1&dl=http%3A%2F%2Fwww.ejbuy.com%2Fen%2Fcustomer%2Faccount%2Findex%2F&ul=zh-cn&de=utf-8&dt=My%20Account&sd=24-bit&sr=1920x1080&vp=1920x985&je=1&fl=11.8%20r800&_u=MAC~&cid=2033167953.1374285368&tid=UA-42302542-1&z=2075773934", ENDITEM,
"Url=/skin/frontend/first/default/images/help4.png", ENDITEM,
"Url=/skin/frontend/first/default/images/help2.png", ENDITEM,
"Url=/skin/frontend/first/default/images/csico.gif", ENDITEM,
"Url=/skin/frontend/first/default/images/menu_s.png", ENDITEM,
"Url=/skin/frontend/first/default/images/menu_tel.png", ENDITEM,
"Url=/skin/frontend/first/default/images/menu_bg.png", ENDITEM,
LAST);
web_url("getItemsTotop_2",
"URL=http://www.ejbuy.com/en/checkout/cart/getItemsTotop/?_=1374285382512",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.ejbuy.com/en/customer/account/index/",
"Snapshot=t7.inf",
"Mode=HTML",
LAST);
web_url("getItemsSummaryQty_2",
"URL=http://www.ejbuy.com/en/checkout/cart/getItemsSummaryQty/?_=1374285382514",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.ejbuy.com/en/customer/account/index/",
"Snapshot=t8.inf",
"Mode=HTML",
LAST);
return 0;
}
复制代码
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2