51Testing软件测试论坛

标题: 为什么我录制的代码执行通过,但是添加功能不成功呢? [打印本页]

作者: fion435    时间: 2007-10-31 17:48
标题: 为什么我录制的代码执行通过,但是添加功能不成功呢?
#include "web_api.h"


Action()
{
        web_set_max_html_param_len("2048");

        /* Registering parameter(s) from source task id 3
        // {Siebel_Analytic_ViewState2} = "/wEPDwUKLTM4OTgwNjU5Nw9kFgJmD2QWAgIDD2QWBAIDDzwrAA0CAA8WAh4LXyFEYXRhQm91bmRnZAwUKwACBQMwOjAUKwACFgoeBFRleHRlHgdFbmFibGVkZx4KU2VsZWN0YWJsZWceCERhdGFQYXRoBRAvKltwb3NpdGlvbigpPTFdHglEYXRhQm91bmRnZGQCBQ9kFgICAQ9kFgJmD2QWAgIBD2QWAmYPZBYCAg0PEA8WAh4HQ2hlY2tlZGhkZGRkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYDBTVjdGwwMCRDb250ZW50UGxhY2VIb2xkZXIxJExvZ2luQXJlYSRMb2dpbjEkUmVtZW1iZXJNZQUZY3RsMDAkX2xvZ2luX3N0YXR1cyRjdGwwMQUZY3RsMDAkX2xvZ2luX3N0YXR1cyRjdGwwMx132SCtXVvyjkg1VBoMW2picMqV"
        // */
        web_reg_save_param("Siebel_Analytic_ViewState2",
                "LB/IC=ViewState\" value=\"",
                "RB/IC=\"",
                "Ord=1",
                "Search=Body",
                "RelFrameId=1",
                LAST);

        web_url("Default.aspx",
                "URL=http://www.testing.com/admin/Default.aspx",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                LAST);

        lr_think_time( 5 );

        web_submit_data("Login.aspx",
                "Action=http://www.testing.com/Login.aspx?ReturnUrl=%2fadmin%2fDefault.aspx",
                "Method=POST",
                "TargetFrame=",
                "RecContentType=text/html",
                "Referer=http://www.testing.com/Login.aspx?ReturnUrl=%2fadmin%2fDefault.aspx",
                "Snapshot=t2.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=__EVENTTARGET", "Value=ctl00$ContentPlaceHolder1$LoginArea$Login1$LoginButton", ENDITEM,
                "Name=__EVENTARGUMENT", "Value=", ENDITEM,
                "Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState2}", ENDITEM,
                "Name=ctl00$ContentPlaceHolder1$LoginArea$Login1$UserName", "Value=hello", ENDITEM,
                "Name=ctl00$ContentPlaceHolder1$LoginArea$Login1$Password", "Value=123456", ENDITEM,
                "Name=__EVENTVALIDATION", "Value=/wEWBwLrvceMCALu+fLtDAK39rnECgLX64WjDwL8g6bdBgLW0ZKeAgLfuviRCKFjiSsyFeC9pXf1kx6AQvbbgH3t", ENDITEM,
                LAST);
作者: fion435    时间: 2007-10-31 17:50
web_url("            ",
                "URL=http://www.testing.com/webmanager/Manage.aspx",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://www.testing.com/admin/Default.aspx",
                "Snapshot=t3.inf",
                "Mode=HTML",
                LAST);

        web_url("             ",
                "URL=http://www.testing.com/webmanager/Insert.aspx",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://www.testing.com/webmanager/Manage.aspx",
                "Snapshot=t4.inf",
                "Mode=HTML",
                LAST);

        lr_think_time( 10 );




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2