google搜索 51Testing站内搜索                    软件测试门户 | 软件测试培 训 | 文章资料精选 | 软件测试论坛 | 软件测试博客 | 测试招聘求职 
打印

[求助] qtp录制脚本出错,请高手执教

qtp录制脚本出错,请高手执教


我用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就会报错,请帮忙看看是不是我那里的配置有错误

TOP

Line (7): "Browser("index").Dialog("Choose file").WinListView("SysListView32").Activate "Suppliers.xls"".
这个市错误提示

TOP

高手麻烦告诉下啊,或给个可以参考的网站或文档啊强烈的谢谢大家阿

TOP

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

小弟在这里拜谢能解决的高手了

TOP

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

小弟在这里拜谢能解决的高手了

TOP

有一种可能是对象不在对象库中,所以可以考虑通过手工添加对象方式把他添加进去
测试是一门武功,流程是套路、工具是武器,有简单的花拳秀腿,也有深奥的少林武功!测试好比战争,知己知彼,方能百战不殆!测试好比破案,精心推断,方能柳暗花明!有人说世界不缺少美,而是缺少发现,我看:其实软件不缺少问题,而是缺少发现!以精深的少林武功、用艺术工程的眼光、战争破案的缜密思维去发现软件世界“美”吧!

TOP

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.
测试是一门武功,流程是套路、工具是武器,有简单的花拳秀腿,也有深奥的少林武功!测试好比战争,知己知彼,方能百战不殆!测试好比破案,精心推断,方能柳暗花明!有人说世界不缺少美,而是缺少发现,我看:其实软件不缺少问题,而是缺少发现!以精深的少林武功、用艺术工程的眼光、战争破案的缜密思维去发现软件世界“美”吧!

TOP

 
当前时区 GMT+8, 现在时间是 2008-10-8 08:21Copyright(C)上海博为峰软件技术有限公司 2001-2007 电话:021-64471599-8017
当您在访问网站、论坛及博客过程中遇到问题时可发送email:webmaster@51testing.com或发送论坛短信至管理员风在吹