51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 3669|回复: 6
打印 上一主题 下一主题

[原创] qtp录制脚本出错,请高手执教

[复制链接]
  • TA的每日心情
    奋斗
    2015-2-4 15:28
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    跳转到指定楼层
    1#
    发表于 2007-10-17 11:26:34 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
    我用9.0录制脚本的时候,qtp自动生成了下面的脚本
    Browser("index").Page("index").Frame("frmLeft").WebEdit("txtUserName").Set "cuibj"
    Browser("index").Page("index").Frame("frmLeft").WebEdit("txtPassword").SetSecure "47157bf1968b66b9cd995fa51c250b1daae0a6d365d9"
    Browser("index").Page("index").Frame("frmLeft").WebButton("Login").Click
    Browser("index").Dialog("Microsoft Internet Explorer").WinButton("OK").Type  micReturn
    Browser("index").Page("index").Frame("frmTop").Link("Business Function").Click
    Browser("index").Page("index").Frame("frmTop_2").Link("Upload Data").Click
    Browser("index").Dialog("Choose file").WinListView("SysListView32").Activate "MaterialMaster.xls"
    Browser("index").Page("index").Frame("frmLeft_2").WebButton("Upload").Click
    Browser("index").Page("index").Frame("frmLeft_3").WebButton("Import Data File").Click
    Browser("index").Dialog("Microsoft Internet Explorer").WinButton("OK").Click
    Browser("index").Page("index").Frame("frmTop_2").Link("LogOff").Click
    Browser("index").Page("index").Sync
    Browser("index").Close
    在执行到点击浏览按钮的时候qtp就会报错,请帮忙看看是不是我那里的配置有错误
    分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
    收藏收藏
    回复

    使用道具 举报

  • TA的每日心情
    奋斗
    2015-2-4 15:28
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    2#
     楼主| 发表于 2007-10-17 11:44:24 | 只看该作者
    Line (7): "Browser("index").Dialog("Choose file").WinListView("SysListView32").Activate "Suppliers.xls"".
    这个市错误提示
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    奋斗
    2015-2-4 15:28
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    3#
     楼主| 发表于 2007-10-18 10:14:30 | 只看该作者
    高手麻烦告诉下啊,或给个可以参考的网站或文档啊强烈的谢谢大家阿
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    奋斗
    2015-2-4 15:28
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    4#
     楼主| 发表于 2007-10-18 10:50:26 | 只看该作者
    Run Error Cannot find the "SysListView32" object's parent "Choose file" (class Dialog). Verify that parent properties match an object currently displayed in your application.
    Line (10): "Browser("Internet Explorer Enhanced").Dialog("Choose file").WinListView("SysListView32").Activate "FGStock.txt"".  

    这个是系统分析出来的错误,我用的是英文版系统,在中文版系统中qtp直接用link实现,但在英文版系统中却是用对对象的操作实现所以产生了这个错误,请高手给指点下是配置错误还是连接的库错误或是其他错误

    我的msn:zhao_b_07@hotmail.com

    小弟在这里拜谢能解决的高手了
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    奋斗
    2015-2-4 15:28
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    5#
     楼主| 发表于 2007-10-18 10:50:51 | 只看该作者
    Run Error Cannot find the "SysListView32" object's parent "Choose file" (class Dialog). Verify that parent properties match an object currently displayed in your application.
    Line (10): "Browser("Internet Explorer Enhanced").Dialog("Choose file").WinListView("SysListView32").Activate "FGStock.txt"".  

    这个是系统分析出来的错误,我用的是英文版系统,在中文版系统中qtp直接用link实现,但在英文版系统中却是用对对象的操作实现所以产生了这个错误,请高手给指点下是配置错误还是连接的库错误或是其他错误

    我的msn:zhao_b_07@hotmail.com

    小弟在这里拜谢能解决的高手了
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    6#
    发表于 2008-3-20 22:28:56 | 只看该作者
    有一种可能是对象不在对象库中,所以可以考虑通过手工添加对象方式把他添加进去
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    7#
    发表于 2008-3-20 22:39:44 | 只看该作者
    This error is thrown because the object which QTP is trying to recognise does not have unique properties. There is another object on the screen who has same properties.
    With the help of object spy get the properties of the object which u want to be tested and then select combination of those properties which will make this object unique.
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-7-4 05:13 , Processed in 0.092181 second(s), 27 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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