I have a windows application developed using .Net, WPF, Infraguistics, Test advantage.
now i want to automate this application using QTP 9.2. but i am unable to get the rowcount from the Swftable/grid. because the grid will be expanded by clicking the parent /child hierarchy. for example the 1st colums will have the numbers like this 1.1,1.2,1.3 and so on and by click on the link you will be able to see associated records. so i am unable to get the rowcount and get cell data even though i used expand all method. so please help me in this regard.
You mention two somewhat conflicting statements, WPF and the UltraWinGrid. If you are using NetAdvantage for WPF, the grid you are likely using is the XamDataGrid, if so unfortunately at this time there is no support for that control for QuickTest Professional. We are looking to develop support for it, and more information on that can be found here :http://community.infragistics.com/forums/p/46649/250420.aspx#250420
If the control that you are using is the UltraWinGrid, then the toolset for that is NetAdvantage for WinForm controls, in which case you can use our corresponding version of TestAdvantage, which you can get the RowCount via the RowCount method. It returns either the base band's row count, or if there is an active row, it will return the row count for the data island that the row is found on. Note that it is the data island and not the whole band. So if you expand a row, and activate a child row of it, and call row count, it will return the count of the rows directly under that parent row.
I hope this answers your question
Thanks for the update and i just want to inform you that "TestAdvantage for windows forms 2007 and 2008" is installed in the system . when i launch QTP i can see .Net and WPF add-in in the add in list, but testadvantage is not shown in the add-in wizard. so please help me in this regard.
Please see the below code which was recorded by QTP.
var_RowCount = SwfWindow("HOMER (Homogenous Operations").SwfWindow("Site Search").SwfTable("ugdSearchResults").RowCount()
As per above code, the SWF table name is "ugdSearchResults" , but not either UltraWinGrid or XamDataGrid. so please help me.
awaiting your early and positive responce.
I just want to give you an quick update that by using .Net windows forms spy i got to know the product name that it is "Infragistics2.Win.UltraWinGrid" . so i believe you got a clarification. so help me to get the row count of parent and child records in the grid.
If the control is the UltraWinGrid, I believe I gave the general instructions for it and you even used it in the post following mine, so if that didn't answer the question, perhaps you can clarify it for me. The method RowCount() which can be called on the grid, returns the row count for the data island of the active row. So if you activate a row then call RowCount() it will give you the some total of all the rows in that data island.