51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 2542|回复: 4
打印 上一主题 下一主题

winrunner学习的时候怎么同时录制多页

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2005-10-25 13:19:33 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我现在要用winrunner测试一个web服务器,想请教一下怎么才能够把所有的页面学习一遍
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2005-10-26 12:50:27 | 只看该作者
这个很难办到,不过有个办法,可以自己写一个应用。
扫描所有的链接,然后把每个页面的对象信息保存

下边写一个如何扫描网页中的对象伪代码例子:
                static i=0;
        static win_desc;
        static desc;
        static ret;
        static attr[];
        static windowname;
       
        #Compile the name of the window for win_get_desc
        windowname = "{class: window, label : \"!.*";
        windowname = windowname & window;
        windowname = windowname & "*\"}";
               
        #Specify the window that you want to learn
        win_get_desc(windowname, "class label", "MSW_ID","index", win_desc);
       
        #Add the window to the new GUI map file
        GUI_add("", window, "", win_desc);
        set_window(window, 1);

        #This loop goes over all the htmlxxxx in the window
        while (obj_exists ("{class:  htmlxxxx , index: "& i &"}") == E_OK)
        {
                #Get the next button description
                obj_get_desc ( "{class:  htmlxxxx , index: "& i & "}", "", "","location", desc);

                #Get the label of the button
                ret = split( desc, attr, "\\\"" );
       
                #Add the htmlxxxx description to the GUI map file
                GUI_add ("", window, attr[4], desc);
                i++;
        }

        扫描该窗体中下一个对象类型,然后加入到gui map中
               
上边是具体扫描对象的例子,还有一个就是需要在代码中添加循环吧所有的链接都保存到一个数组中,然后用队列或者栈的算法,处理掉每一个链接,然后在把每个对象放gui map中
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2005-11-2 09:30:03 | 只看该作者
好东西哦,顶一下!~
回复 支持 反对

使用道具 举报

该用户从未签到

4#
发表于 2005-11-4 16:11:20 | 只看该作者
嗯,是不错,就是看不懂~~~~~~~~~
回复 支持 反对

使用道具 举报

该用户从未签到

5#
发表于 2005-11-8 11:53:42 | 只看该作者
看不懂说明我们还需要努力,加油阿!
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-6-2 10:44 , Processed in 0.071564 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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