loadrunner Web_类函数之web_reg_dialog()

来源:互联网 发布:关键词排名优化小技巧 编辑:程序博客网 时间:2024/06/13 21:37

web_reg_dialog()

为后续对JavaScript函数的调用注册用户响应(帮我们处理JavaScript函数调用处理的过程)。

int web_reg_dialog( DESCRIPTION, description arguments, ACTION, actionarguments, LAST );

 

此函数在成功时返回LR_PASS(0),或在失败时返回LR_FAIL(1)。请注意,LR_PASS和LR_FAIL通常指示函数调用是否完成而没有异常,而不是测试步骤成功。

 

此功能可用于Web(点击和脚本),Oracle Web应用程序11iPeopleSoft EnterpriseAJAX(点击和脚本)和SAP(点击和脚本)脚本。

 

示例:web_reg_dialog()

在以下示例中,web_reg_dialog模拟用户单击确定按钮继续。

web_reg_dialog(

    DESCRIPTION,

        "Type=Confirm",

        "Message=Click OK tocontinue",

    ACTION,

        "Click=OK" ,

LAST );

 

在以下示例中,web_reg_dialog模拟用户在编辑框中输入文本。

web_reg_dialog(

    DESCRIPTION,

        "Type=Prompt",

        "Message=Where is WaltWhitman buried?",

    ACTION,

        "SetText=Camden, N.J." ,

LAST );

原创粉丝点击