51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2321|回复: 1
打印 上一主题 下一主题

[求助] 两个脚本相同动作的脚本。帮我做做关联吧

[复制链接]
  • TA的每日心情

    2024-10-20 14:47
  • 签到天数: 564 天

    连续签到: 1 天

    [LV.9]测试副司令

    跳转到指定楼层
    1#
    发表于 2013-7-20 10:14:35 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
    本帖最后由 让测试飞起来 于 2013-7-20 10:16 编辑

    两个相同动作的脚本,回放都不成功

    网址是www.ejbuy.com
    要是可以的话,帮录制一个登录的,回放可以成功 !
    录制了两个脚本 相同动作的
    1. Action()
    2. {

    3.         web_url("www.ejbuy.com",
    4.                 "URL=http://www.ejbuy.com/",
    5.                 "Resource=0",
    6.                 "RecContentType=text/html",
    7.                 "Referer=",
    8.                 "Snapshot=t1.inf",
    9.                 "Mode=HTML",
    10.                 EXTRARES,
    11.                 "Url=/skin/frontend/first/default/images/index_bg.gif", ENDITEM,
    12.                 "Url=/skin/frontend/first/default/images/top_sc.png", ENDITEM,
    13.                 "Url=/skin/frontend/first/default/images/topbg.png", ENDITEM,
    14.                 "Url=/skin/frontend/first/default/images/menu_bg.png", ENDITEM,
    15.                 "Url=/skin/frontend/first/default/images/menu_s.png", ENDITEM,
    16.                 "Url=/skin/frontend/first/default/images/focus_bg.jpg", ENDITEM,
    17.                 "Url=/skin/frontend/first/default/images/menu_tel.png", ENDITEM,
    18.                 "Url=/skin/frontend/first/default/images/en_tools.gif", ENDITEM,
    19.                 "Url=http://www.google-analytics.com/analytics.js", ENDITEM,
    20.                 "Url=/skin/frontend/first/default/images/new_tui_tbg.png", ENDITEM,
    21.                 "Url=/skin/frontend/first/default/images/new_tui_active_20.png", ENDITEM,
    22.                 "Url=/skin/frontend/first/default/images/focus_01_link_bg.gif", ENDITEM,
    23.                 "Url=/skin/frontend/first/default/images/sale.png", ENDITEM,
    24.                 "Url=/skin/frontend/first/default/images/csico.gif", ENDITEM,
    25.                 "Url=/skin/frontend/first/default/images/help2.png", ENDITEM,
    26.                 "Url=/skin/frontend/first/default/images/help4.png", ENDITEM,
    27.                 "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,
    28.                 LAST);

    29.         web_url("getItemsSummaryQty",
    30.                 "URL=http://www.ejbuy.com/en/checkout/cart/getItemsSummaryQty/?_=1374284712529",
    31.                 "Resource=0",
    32.                 "RecContentType=text/html",
    33.                 "Referer=http://www.ejbuy.com/",
    34.                 "Snapshot=t2.inf",
    35.                 "Mode=HTML",
    36.                 LAST);

    37.         web_url("getItemsTotop",
    38.                 "URL=http://www.ejbuy.com/en/checkout/cart/getItemsTotop/?_=1374284712496",
    39.                 "Resource=0",
    40.                 "RecContentType=text/html",
    41.                 "Referer=http://www.ejbuy.com/",
    42.                 "Snapshot=t3.inf",
    43.                 "Mode=HTML",
    44.                 LAST);

    45.         web_add_cookie("_ga=GA1.2.1620755610.1374284713; DOMAIN=www.ejbuy.com");

    46.         web_url("login",
    47.                 "URL=http://www.ejbuy.com/en/customer/account/login/",
    48.                 "Resource=0",
    49.                 "RecContentType=text/html",
    50.                 "Referer=http://www.ejbuy.com/",
    51.                 "Snapshot=t4.inf",
    52.                 "Mode=HTML",
    53.                 EXTRARES,
    54.                 "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,
    55.                 "Url=/skin/frontend/first/default/images/help4.png", ENDITEM,
    56.                 "Url=/skin/frontend/first/default/images/csico.gif", ENDITEM,
    57.                 "Url=/skin/frontend/first/default/images/top_sc.png", ENDITEM,
    58.                 "Url=/skin/frontend/first/default/images/help2.png", ENDITEM,
    59.                 "Url=/skin/frontend/first/default/images/topbg.png", ENDITEM,
    60.                 "Url=/skin/frontend/first/default/images/index_bg.gif", ENDITEM,
    61.                 LAST);

    62.         lr_think_time(11);

    63.         web_submit_data("loginpost",
    64.                 "Action=http://www.ejbuy.com/en/customer/account/loginpost/",
    65.                 "Method=POST",
    66.                 "RecContentType=application/json",
    67.                 "Referer=http://www.ejbuy.com/en/customer/account/login/",
    68.                 "Snapshot=t5.inf",
    69.                 "Mode=HTML",
    70.                 "EncodeAtSign=YES",
    71.                 ITEMDATA,
    72.                 "Name=email", "Value=1300115774@qq.com", ENDITEM,
    73.                 "Name=password", "Value=8639304", ENDITEM,
    74.                 LAST);

    75.         web_reg_find("Text=1300115774@qq.com",
    76.                 LAST);

    77.         web_url("index",
    78.                 "URL=http://www.ejbuy.com/en/customer/account/index/",
    79.                 "Resource=0",
    80.                 "RecContentType=text/html",
    81.                 "Referer=http://www.ejbuy.com/en/customer/account/login/",
    82.                 "Snapshot=t6.inf",
    83.                 "Mode=HTML",
    84.                 EXTRARES,
    85.                 "Url=/skin/frontend/first/default/images/index_bg.gif", ENDITEM,
    86.                 "Url=/skin/frontend/first/default/images/top_sc.png", ENDITEM,
    87.                 "Url=/skin/frontend/first/default/images/topbg.png", ENDITEM,
    88.                 "Url=http://www.google-analytics.com/analytics.js", ENDITEM,
    89.                 "Url=/skin/frontend/first/default/images/help4.png", ENDITEM,
    90.                 "Url=/skin/frontend/first/default/images/csico.gif", ENDITEM,
    91.                 "Url=/skin/frontend/first/default/images/help2.png", ENDITEM,
    92.                 "Url=/skin/frontend/first/default/images/menu_tel.png", ENDITEM,
    93.                 "Url=/skin/frontend/first/default/images/menu_s.png", ENDITEM,
    94.                 "Url=/skin/frontend/first/default/images/menu_bg.png", ENDITEM,
    95.                 "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,
    96.                 LAST);

    97.         web_url("getItemsSummaryQty_2",
    98.                 "URL=http://www.ejbuy.com/en/checkout/cart/getItemsSummaryQty/?_=1374284729494",
    99.                 "Resource=0",
    100.                 "RecContentType=text/html",
    101.                 "Referer=http://www.ejbuy.com/en/customer/account/index/",
    102.                 "Snapshot=t7.inf",
    103.                 "Mode=HTML",
    104.                 LAST);

    105.         web_url("getItemsTotop_2",
    106.                 "URL=http://www.ejbuy.com/en/checkout/cart/getItemsTotop/?_=1374284729492",
    107.                 "Resource=0",
    108.                 "RecContentType=text/html",
    109.                 "Referer=http://www.ejbuy.com/en/customer/account/index/",
    110.                 "Snapshot=t8.inf",
    111.                 "Mode=HTML",
    112.                 LAST);

    113.         return 0;
    114. }
    复制代码
    第二
    分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
    收藏收藏
    回复

    使用道具 举报

  • TA的每日心情

    2024-10-20 14:47
  • 签到天数: 564 天

    连续签到: 1 天

    [LV.9]测试副司令

    2#
     楼主| 发表于 2013-7-20 10:15:02 | 只看该作者
    1. Action()
    2. {

    3.         web_url("www.ejbuy.com",
    4.                 "URL=http://www.ejbuy.com/",
    5.                 "Resource=0",
    6.                 "RecContentType=text/html",
    7.                 "Referer=",
    8.                 "Snapshot=t1.inf",
    9.                 "Mode=HTML",
    10.                 EXTRARES,
    11.                 "Url=/skin/frontend/first/default/images/topbg.png", ENDITEM,
    12.                 "Url=/skin/frontend/first/default/images/top_sc.png", ENDITEM,
    13.                 "Url=/skin/frontend/first/default/images/index_bg.gif", ENDITEM,
    14.                 "Url=/skin/frontend/first/default/images/menu_bg.png", ENDITEM,
    15.                 "Url=/skin/frontend/first/default/images/menu_tel.png", ENDITEM,
    16.                 "Url=http://www.google-analytics.com/analytics.js", ENDITEM,
    17.                 "Url=/skin/frontend/first/default/images/en_tools.gif", ENDITEM,
    18.                 "Url=/skin/frontend/first/default/images/new_tui_tbg.png", ENDITEM,
    19.                 "Url=/skin/frontend/first/default/images/new_tui_active_20.png", ENDITEM,
    20.                 "Url=/skin/frontend/first/default/images/sale.png", ENDITEM,
    21.                 "Url=/skin/frontend/first/default/images/focus_01_link_bg.gif", ENDITEM,
    22.                 "Url=/skin/frontend/first/default/images/focus_bg.jpg", ENDITEM,
    23.                 "Url=/skin/frontend/first/default/images/menu_s.png", ENDITEM,
    24.                 "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,
    25.                 "Url=/skin/frontend/first/default/images/help2.png", ENDITEM,
    26.                 "Url=/skin/frontend/first/default/images/csico.gif", ENDITEM,
    27.                 "Url=/skin/frontend/first/default/images/help4.png", ENDITEM,
    28.                 LAST);

    29.         web_url("getItemsSummaryQty",
    30.                 "URL=http://www.ejbuy.com/en/checkout/cart/getItemsSummaryQty/?_=1374285368138",
    31.                 "Resource=0",
    32.                 "RecContentType=text/html",
    33.                 "Referer=http://www.ejbuy.com/",
    34.                 "Snapshot=t2.inf",
    35.                 "Mode=HTML",
    36.                 LAST);

    37.         web_url("getItemsTotop",
    38.                 "URL=http://www.ejbuy.com/en/checkout/cart/getItemsTotop/?_=1374285368104",
    39.                 "Resource=0",
    40.                 "RecContentType=text/html",
    41.                 "Referer=http://www.ejbuy.com/",
    42.                 "Snapshot=t3.inf",
    43.                 "Mode=HTML",
    44.                 LAST);

    45.         web_add_cookie("_ga=GA1.2.2033167953.1374285368; DOMAIN=www.ejbuy.com");

    46.         web_url("login",
    47.                 "URL=http://www.ejbuy.com/en/customer/account/login/",
    48.                 "Resource=0",
    49.                 "RecContentType=text/html",
    50.                 "Referer=http://www.ejbuy.com/",
    51.                 "Snapshot=t4.inf",
    52.                 "Mode=HTML",
    53.                 EXTRARES,
    54.                 "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,
    55.                 "Url=/skin/frontend/first/default/images/help4.png", ENDITEM,
    56.                 "Url=/skin/frontend/first/default/images/csico.gif", ENDITEM,
    57.                 "Url=/skin/frontend/first/default/images/help2.png", ENDITEM,
    58.                 "Url=/skin/frontend/first/default/images/index_bg.gif", ENDITEM,
    59.                 "Url=/skin/frontend/first/default/images/topbg.png", ENDITEM,
    60.                 "Url=/skin/frontend/first/default/images/top_sc.png", ENDITEM,
    61.                 LAST);

    62.         web_submit_data("loginpost",
    63.                 "Action=http://www.ejbuy.com/en/customer/account/loginpost/",
    64.                 "Method=POST",
    65.                 "RecContentType=application/json",
    66.                 "Referer=http://www.ejbuy.com/en/customer/account/login/",
    67.                 "Snapshot=t5.inf",
    68.                 "Mode=HTML",
    69.                 "EncodeAtSign=YES",
    70.                 ITEMDATA,
    71.                 "Name=email", "Value=1300115774@qq.com", ENDITEM,
    72.                 "Name=password", "Value=8639304", ENDITEM,
    73.                 LAST);

    74.         web_reg_find("Text=1300115774@qq.com",
    75.                 LAST);

    76.         web_url("index",
    77.                 "URL=http://www.ejbuy.com/en/customer/account/index/",
    78.                 "Resource=0",
    79.                 "RecContentType=text/html",
    80.                 "Referer=http://www.ejbuy.com/en/customer/account/login/",
    81.                 "Snapshot=t6.inf",
    82.                 "Mode=HTML",
    83.                 EXTRARES,
    84.                 "Url=/skin/frontend/first/default/images/index_bg.gif", ENDITEM,
    85.                 "Url=/skin/frontend/first/default/images/top_sc.png", ENDITEM,
    86.                 "Url=/skin/frontend/first/default/images/topbg.png", ENDITEM,
    87.                 "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,
    88.                 "Url=/skin/frontend/first/default/images/help4.png", ENDITEM,
    89.                 "Url=/skin/frontend/first/default/images/help2.png", ENDITEM,
    90.                 "Url=/skin/frontend/first/default/images/csico.gif", ENDITEM,
    91.                 "Url=/skin/frontend/first/default/images/menu_s.png", ENDITEM,
    92.                 "Url=/skin/frontend/first/default/images/menu_tel.png", ENDITEM,
    93.                 "Url=/skin/frontend/first/default/images/menu_bg.png", ENDITEM,
    94.                 LAST);

    95.         web_url("getItemsTotop_2",
    96.                 "URL=http://www.ejbuy.com/en/checkout/cart/getItemsTotop/?_=1374285382512",
    97.                 "Resource=0",
    98.                 "RecContentType=text/html",
    99.                 "Referer=http://www.ejbuy.com/en/customer/account/index/",
    100.                 "Snapshot=t7.inf",
    101.                 "Mode=HTML",
    102.                 LAST);

    103.         web_url("getItemsSummaryQty_2",
    104.                 "URL=http://www.ejbuy.com/en/checkout/cart/getItemsSummaryQty/?_=1374285382514",
    105.                 "Resource=0",
    106.                 "RecContentType=text/html",
    107.                 "Referer=http://www.ejbuy.com/en/customer/account/index/",
    108.                 "Snapshot=t8.inf",
    109.                 "Mode=HTML",
    110.                 LAST);

    111.         return 0;
    112. }
    复制代码
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-11-26 13:06 , Processed in 0.066343 second(s), 27 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表