UFT-API:如何将选择数据操作的输出写入测试的数据源 [英] UFT-API: How to write the output of a select data action to the test's data source

查看:72
本文介绍了UFT-API:如何将选择数据操作的输出写入测试的数据源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在uft-api测试中,我有一个选择数据组件来返回查询结果.结果返回到数组中,我试图弄清楚如何将结果写回到测试的数据窗格(excel或本地表)中.

In a uft-api test I have a select data component that returns the query results. The results comeback in an array and I'm trying to figure out how to write the results back to the test's data pane, either excel or local table.

推荐答案

您可以使用UFT API的GetDataSource类, 它将像这样工作:假设您从FlightSampleData.xls导入了excel,并将其命名为FlightSampleData,您有<input>工作表,访问工作表的方式如下:

You can use GetDataSource Class of UFT API , it will work like this lets say you imported excel from FlightSampleData.xls, and named it as FlightSampleData, you have <input> sheet, accessing the sheet will be like below:

GetDataSource("FlightSampleData!input).Set(ROW,ColumnName,yourValue);
GetDataSource("FlightSampleData!input).Get(ROW,ColumnName);

我建议您去UFT的帮助部分,那里有许多我们认为从未有过的有价值的文件.所有对象引用都在那里.

I recommend you go to help section of UFT , there are many valuable documents that we thought we never had. all the object reference is out there .

这篇关于UFT-API:如何将选择数据操作的输出写入测试的数据源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆