Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
310
How to recognise a grid uniquely form a series of grids?
posted

Hi,

I have a test that opens a bunch of grid objects at once. that means there will be more than one grid at a time open but only one grid will be active. All other grids are shown on the tab group. if you want to view some other grid that can be done by selecting that particular tab on tab group. Here the problem is QTP is not recognising every grid as separate grid. the test has to select the tab and then retrieve a cell value from the active grid and then move on to next tab. Every time it moves to next tab, it has to retrieve cell data from the grid which is currently active. here it is able to get the cell value from the very first grid but next time it is not reading from the next successive tab. grid table object remaining same for all the tabs and it is giving me the cell data of the first grid for all successive tabs. I thought I should make QTP to recognise grid with the index property because all open grids have same properties. I set the SwfTable object index to 0 in repository. that did not fix the problem. I tried Visible property in repository assuming one grid is visible at that moment. but this did not help me.

SwfWindow("MainWindow").SwfWindow("ABC").SwfTable("gridMain").GetCellData(CInt(5), "ColumnX")

This is the line of code which is used to read a value of a cell from the grid. This works for first time for the first grid but how to make this work for all successive grids?

I appreciate if some body could help on this issue because this is very much needed for my test execution.

Thanks,

Vidya