51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2424|回复: 3
打印 上一主题 下一主题

[Robot] 大哥大姐们进来一下,关于脚本

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2005-12-20 10:13:43 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
谁能给我个简单的登陆页面的脚本呀,但是要加上分析的,要详细点的,最好能告诉我写一个好的脚本的要素
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2005-12-20 16:52:59 | 只看该作者
'$Include "SQAUTIL.SBH"
Sub Main
    Dim Result As Integer

    dim i as integer   
    dim username as string   
    dim pwd as string   
   
    dim dp as long

  
    'Initially Recorded: 2005-12-19  17:34:27
    'Script Name: 5
   
    Window SetContext, "Class=Shell_TrayWnd", ""
    TabControl Click, "ObjectIndex=1;\;ItemIndex=0", ""
    StartApplication """F:\GPS 0.1test\gps\GpsClent.exe"""
   
    dp=SQADatapoolOpen("login")
    for i=1 to 100
    Call SQADatapoolFetch(dp)
    Call SQADatapoolValue(dp,1,username)   
    Call SQADatapoolValue(dp,2,pwd)

   
    Window SetContext, "Caption=监控端", ""
    Window Click, "", "Coords=30,-13"
    PopupMenuSelect "登陆"
   
    Window SetContext, "Caption=登录", ""
    InputKeys username
    EditBox Click, "ObjectIndex=2", "Coords=13,8"
    InputKeys pwd
   
    Window SetContext, "Class=Shell_TrayWnd", ""
    TabControl Click, "ObjectIndex=1;\;ItemIndex=3", ""
   
    Result = WindowVP (CompareNumeric, "Caption=登录", "VP=Alphanumeric;Value=0")
   
    Window SetContext, "Caption=登录", ""
    PushButton Click, "Text=确定"        
   
    Window SetContext, "Caption=监控端", ""
    Window Click, "", "Coords=35,-16"
    PopupMenuSelect "退出登陆"
   
    next   
    Call SQADatapoolClose(dp)
   
    Window Click, "", "Coords=29,-12"
    PopupMenuSelect "退出"
         
    Window SetContext, "Class=Shell_TrayWnd", ""
    TabControl Click, "ObjectIndex=1;\;ItemIndex=3", ""

End Sub

'这个程序可以实现大数据量的登陆测试。只要有点编程经验和英语好的话,脚本很容易看懂的。
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2005-12-20 16:54:39 | 只看该作者
'$Include "SQAUTIL.SBH"
Sub Main
    Dim Result As Integer

    dim i as integer   
    dim username as string   
    dim pwd as string   
   
    dim dp as long

  
    'Initially Recorded: 2005-12-19  17:34:27
    'Script Name: 5
   
    Window SetContext, "Class=Shell_TrayWnd", ""
    TabControl Click, "ObjectIndex=1;\;ItemIndex=0", ""
    StartApplication """F:\GPS 0.1test\gps\GpsClent.exe"""
   
    dp=SQADatapoolOpen("login")
    for i=1 to 100
    Call SQADatapoolFetch(dp)
    Call SQADatapoolValue(dp,1,username)   
    Call SQADatapoolValue(dp,2,pwd)

   
    Window SetContext, "Caption=监控端", ""
    Window Click, "", "Coords=30,-13"
    PopupMenuSelect "登陆"
   
    Window SetContext, "Caption=登录", ""
    InputKeys username
    EditBox Click, "ObjectIndex=2", "Coords=13,8"
    InputKeys pwd
   
    Window SetContext, "Class=Shell_TrayWnd", ""
    TabControl Click, "ObjectIndex=1;\;ItemIndex=3", ""
   
    Result = WindowVP (CompareNumeric, "Caption=登录", "VP=Alphanumeric;Value=0")
   
    Window SetContext, "Caption=登录", ""
    PushButton Click, "Text=确定"        
   
    Window SetContext, "Caption=监控端", ""
    Window Click, "", "Coords=35,-16"
    PopupMenuSelect "退出登陆"
   
    next   
    Call SQADatapoolClose(dp)
   
    Window Click, "", "Coords=29,-12"
    PopupMenuSelect "退出"
         
    Window SetContext, "Class=Shell_TrayWnd", ""
    TabControl Click, "ObjectIndex=1;\;ItemIndex=3", ""

End Sub

'这个程序可以实现大数据量的登陆测试。只要有点编程经验和英语好的话,脚本很容易看懂的。
回复 支持 反对

使用道具 举报

该用户从未签到

4#
发表于 2005-12-20 17:17:16 | 只看该作者
你这个阶段给再详细的资料你也没用,先从基础东西看起
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-11-26 06:31 , Processed in 0.065887 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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