Forum Discussion

Rajesh2's avatar
Rajesh2
Contributor
9 years ago
Solved

How to fetch the data from a Grid/dataset/table?

Hi,

 

Greetings,

 

NOTE: Please solve my queries on the basis of Python language as i am working in Python

 

I am working in a project where in we are using TestComplete with Python language. I have some queries, Can anyone please clarify my queries as soon as possible..

 

Query1:

How to fetch the data from a Grid/dataset/table? I have attached the Screenshot of the Grid. Can anyone please let me know how to fetch the firstname or lastname. When i object spy on the grid it is not spying the data present in it, but it is spying on the Grid layout.

I have tried with adding it into a table in TC and then fetching from it. But it is tidious as we need to keep on updating the table manually everytime it gets updated. Please suggest any other solutions.

NOTE: Screenshot attached(GridImage.png)

 

Query2:

I need to fetch the data from excel file and send that data as argument in the application. I am able to fetch using DDT driver. driver.Value[0 or 1 or 2...] but i want to fetch the data on the basis of the column Name. Like if the Column name is FirstName then it should fetch the data from that column only. Can anyone please suggest how to go about this?

 

Query3:

How to get a snapshot on the failure of the script?

 

Query4:

Can we get the report in Excel format.