UFT-API: How to write the output of a select data action to the test's data source

时间秒杀一切 提交于 2019-12-08 02:34:15

问题


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.


回答1:


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);

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 .




回答2:


this.Dbfetch10.OutputProperties.GetElementsByTagName("EMP_NAME").item(0).InnerText;

Note :-

EMP_NAME - exact field name in database Dbfetch10- appropriate stepname of the SelectData



来源:https://stackoverflow.com/questions/26634305/uft-api-how-to-write-the-output-of-a-select-data-action-to-the-tests-data-sour

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!