zoukankan      html  css  js  c++  java
  • LR常用函数

    web_set_max_html_param_len()--常用函数

    设置可检索并保存为参数的任何HTML字符串的最大长度。

    intweb_set_max_html_param_len(const char * length);

    参数说明:

    object:评估到类型为WebApi的对象的表达式。通常是webfor Java和Visual Basic。另请参见函数和常量前缀。

    length:可以检索的任何HTML字符串的最大长度。不要输入大于无符号整数(4294967295)的值的长度。

    一般信息:

    web_set_max_html_param_len函数是在关联HTML语句时使用的服务函数。仅在启用录制期间的相关性时才会记录(请参阅VuGen的录制选项)。

    web_set_max_html_param_len函数设置VuGen可以检索和保存在参数中的任何HTML字符串的最大长度。在关联期间可以捕获的参数的最大长度的默认值为256个字符(请参阅web_reg_save_param)。要检索长度超过256个字符的字符串,请使用web_set_max_html_param_len增加最大有效长度。尝试保存长度超过最大长度的字符串将失败。

    所有Web脚本以及以HTTP模式或无线会话协议(WSP)重放模式运行的WAP脚本支持此功能。

    示例:web_set_max_html_param_len

    以下示例将您可以检索并在参数中保存的HTML数据的最大长度设置为1024个字符:

    web_set_max_html_param_len(“1024”);

    一、函数用途
    记录http响应的信息
    二、函数属性
    1.http_info_return_code:     返回http代码
    2.http_info_download_size:返回页面字节数
    3.http_info_download_time:返回页面下载时间
    三、例子
    The following example uses the web_get_int_property function to check if the Vuser successfully accessed the dogbert home page. 
    
    TEST() 
    
    { 
    
    int HttpRetCode; 
    
    web_url("dogbert", 
    
    "URL=http://dogbert", 
    
    "TargetFrame=_TOP", 
    
    LAST); 
    
    HttpRetCode = web_get_int_property(HTTP_INFO_RETURN_CODE); 
    
    if (HttpRetCode == 200) 
    
    lr_log_message("The Vuser successfully accessed the Dogbert home page"); 
    
    else 
    
    lr_log_message("The Vuser failed to access the Dogbert home page "); 
    
    }

    file操作函数
    1、函数用途
    1)fopen:文件打开函数
    2)fwrite:文件内容写入函数
    3)fclose:文件关闭函数

  • 相关阅读:
    Linux常用命令大全(非常全!!!)
    TCP连接的建立与释放(三次握手与四次挥手)
    TCP/IP Http 和Https socket之间的区别
    redis持久化方法对比分析
    关于HTTP协议,一篇就够了
    远程桌面不能拷贝文件的问题
    URLDecoder: Incomplete trailing escape (%) pattern
    利用pdf2swf将PDF转换成SWF
    Oracle删除当前用户下所有的表的方法
    JS简单验证密码强度
  • 原文地址:https://www.cnblogs.com/shuilan55555/p/7930080.html
Copyright © 2011-2022 走看看