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

[求助] 请教高手一个菜问题:使用指定的URL录制脚本后,再次回放时如何更改该刚刚指定的URL

本主题由 fishy 于 2008-4-21 15:44 移动

请教高手一个菜问题:使用指定的URL录制脚本后,再次回放时如何更改该刚刚指定的URL


我在录制web应用程序时,使用了指定的URL路径录制的,现在路径变化了,我想改变该脚本的路径,请问在哪改变。我都没有看到打开URL的脚本代码。以下是我的脚本代码
Browser("SmartWeb V2.2").Page("SmartWeb V2.2").WebEdit("txtUid").Set "73002"
Browser("SmartWeb V2.2").Page("SmartWeb V2.2").WebEdit("txtPwd").SetSecure "4805c996736eb1a5"
Browser("SmartWeb V2.2").Page("SmartWeb V2.2").Image("login04").Click 90,15
Browser("SmartWeb V2.2").Page("Smart Web V").Frame("left").Link("我的郵箱").Click
Browser("SmartWeb V2.2").Page("Smart Web V_2").Frame("left").Image("plusbottom").Click
Browser("SmartWeb V2.2").Page("Smart Web V").Frame("left").Link("寫郵件").Click
Browser("SmartWeb V2.2").Page("Smart Web V").Frame("main").WebButton("新增").Click
Browser("SmartWeb V2.2").Window("員工搜尋 -- 網頁對話").Page("員工搜尋").WebEdit("txt_emp").Set "96"
Browser("SmartWeb V2.2").Window("員工搜尋 -- 網頁對話").Page("員工搜尋").WebButton("查詢").Click
Browser("SmartWeb V2.2").Window("員工搜尋 -- 網頁對話").Page("員工搜尋").WbfGrid("DataGrid1").SetCellData 2,5,"ON"
Browser("SmartWeb V2.2").Window("員工搜尋 -- 網頁對話").Page("員工搜尋").WebButton("選取").Click
Browser("SmartWeb V2.2").Window("員工搜尋 -- 網頁對話").Page("員工搜尋").WebButton("確定").Click

[ 本帖最后由 lch_love_hl 于 2008-4-18 10:33 编辑 ]

TOP

在 automation --> record and run setting 里,大致是这个目录,家里没QTP菜单可能记的有点误差,你先看看吧
☆欢迎访问我的blog: http://blog.sina.com.cn/hurui82

TOP

在 automation --> record and run setting ->web 里
选择成 record and run test on any open browser
然后在代码的最前面 加
SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe", "http://www.baidu.com"
或者
选择成 open the following address when a rcord or run session begins
下的下拉框改成 改变后的地址
QQ群:45110240 希望爱测试爱聊天的人进入
软件质量=流程+组织+技术
为每个软件打好预防针

TOP

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