51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

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

[求助] 为何无法访问url地址,如正文,谢谢

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2013-9-4 00:27:38 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
脚本如下:
char *str1;
        int row;
        row=rand()%100+1;
        if(row<=90)
        {
                  lr_output_message("%s",string);
                  lr_output_message("随机数为%d",row);
                  str1=lr_get_attrib_string("url_1");
                  lr_output_message("%s",str1);
        web_url("baidu",
                "URL=str1",
                "TargetFrame=",
                "Resource=0",
                "Referer=",
                LAST);

        }

运行结果:
Action.c(9): we are chinese
Action.c(10): 随机数为67
Action.c(12): http://www.baidu.com
Action.c(13): Warning -32999: Invalid scheme (not "http:" / "https:") in URL="str1"          [MsgId: MWAR-32999]
Action.c(13): Error -32999: Invalid scheme (not "http:" / "https:") in URL="str1"          [MsgId: MERR-32999]
Action.c(13): web_url("baidu") highest severity level was "ERROR", 0 body bytes, 0 header bytes          [MsgId: MMSG-26388]


str1已经通过 lr_get_attrib_string()函数赋值,为何在web_url中无法访问呢?谢谢,帮忙解答
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

  • TA的每日心情
    擦汗
    2017-10-27 14:21
  • 签到天数: 306 天

    连续签到: 1 天

    [LV.8]测试军长

    2#
    发表于 2013-9-4 11:14:20 | 只看该作者
    URL=str1错误!
    URL=后填写需要访问的地址,这是一个字符串,str1在这里仅显示为str1,而不是现实其值
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-5-22 09:18 , Processed in 0.073727 second(s), 27 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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