51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 1897|回复: 1
打印 上一主题 下一主题

[原创] 读不出DataTable中的数据。

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2010-7-16 18:52:15 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Dim User_ID_Path, S_Password

User_ID_Path = DataTable.GetSheet("Global").GetParameter("User_ID_Path").ValueByRow(1)
S_Password = DataTable.GetSheet("Global").GetParameter("Password").ValueByRow(1)

Window("IBM Lotus Notes").Activate
Window("IBM Lotus Notes").Dialog("Lotus Notes").Activate
Window("IBM Lotus Notes").Dialog("Lotus Notes").WinButton("Cancel").Click
Window("IBM Lotus Notes").Dialog("Unsuccessful Notes Login").WinRadioButton("Switch to a different").Set
Window("IBM Lotus Notes").Dialog("Unsuccessful Notes Login").WinButton("OK").Click
Window("IBM Lotus Notes").Dialog("Choose User ID to Switch").WinEdit("File name:").Type User_ID_path
Window("IBM Lotus Notes").Dialog("Choose User ID to Switch").WinButton("Open").Click

Window("IBM Lotus Notes").Dialog("Lotus Notes").WinObject("Enter your password").Type S_Password

Window("IBM Lotus Notes").Dialog("Lotus Notes").WinObject("Enter your password").Type  micReturn

上面的代码在QTP单机环境下能运行正常,但当我建了一个script component到QC上,用的是同样的代码,且在DataTable中用的也是一一模一样的数据。当在QC的 Test Lab中运行时,print出来的User_ID_Path和S_Password都是空的。(Test Lab中运行的这个Test Set是由两个script component组成的,这是第二个,第一个就是用SystemUtil.Run打开测试程序。)

请大家分析一下原因。谢谢
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2010-7-19 10:14:00 | 只看该作者
请大家帮忙分析一下,是不是这种方式下就不能用Datatable来实现参数化。
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-5-5 17:58 , Processed in 0.068529 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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