I am trying to troubleshoot a problem we are having when we record actions against the WinUltraGrid in our .NET program.
We have a grid full of data, and we want to filter down to one row using the grid filters.
When we record filtering of the grid we get code like this is generated in HP QTP.
SwfWindow("Returns - TaxSolver").SwfWindow("Return List").SwfTable("grdReturnList").SetFilter "0;Data Entry Type", "Manual" SwfWindow("Returns - TaxSolver").SwfWindow("Return List").SwfTable("grdReturnList").SetFilter "0;State", "ME" SwfWindow("Returns - TaxSolver").SwfWindow("Return List").SwfTable("grdReturnList").SetFilter "0;Return Name", "ME ST-7 IMPORTED Amended"
When we playback the recording, HP QTP successfully clicks the correct column filter icon, which drops down the menu, and a filter is selected/highlighted, and then the playback pauses, like it is waiting for something.
I have to press the windows key to draw the focus away from the program, which makes the filter drop down go away. It does not appear to actually clicked the filter, because no filter gets applied.
However, no error is actually generated, it thinks it selected the filters, and continues to the next step in the test.
If the next step is to filter on a second column, the same thing happens again, it tries to select a filter, but just pauses after selecting one, and the drop down stays up, until I press the windows key.
Any help would be greatly appreciated.
I am using HP QTP 10 with a trial version of the Infragistics Test Advantage Net Addin for QTP 2009.1 and NetAdvantage 2009.1
Verison Information - Sample DLLs from each program. (Infragistics2.QTPServer.WinGrid.v9.1.dll - Infragistics.QTPServer.WinGrid.v9.1 9.1.20091.1000) (Infragistics2.Win.UltraWinGrid.v9.1.dll - Infragistics2.Win.UltraWinGrid.v9.1 - 9.1.20091.1000)
Hello,
This behavior was fixed in May 8th 2010, in service releases for TestAdvantage 2009 Volume 1 through 2010 Volume 1, and in the release build of 2010 Volume 2 forward. This behavior was likely caused by the implementation of support for the NetAdvantage Excel style filtering released in 2009 Volume 1, and should not be an issue prior to that release.
I am also facing the same Issue. The Version I am using is 6.3.20063.28. I think I need to update the vesrion. Please confirm on the same and let me know the latest version which I can use?
Thanks in Advance
Regards
Kirtee
Jim,
Have you tested this with the sample application that I had posted earlier? I think this will work if you use code like this:
SwfWindow("Fun with Filters").SwfTable("ultraGrid1").ActivateRow "1"
SwfWindow("Fun with Filters").SwfTable ("ultraGrid1").Click x, y,micRightBtn
SwfWindow("Fun with Filters").SwfTable("ultraGrid1").WinMenu("ContextMenu").Select "Auto Filter"
SwfWindow("Fun with Filters").SwfTable("ultraGrid1").SetFilter "0;City", "Madrid"
If you run that script against the application that I attached I think you will see that it will filter in all the rows that have "Madrid" in the "City" column.
Could you try that and see if it works for you? Or let me know if you need me to supply you with a new executable to test against.
Hi,
SetFilter method is working well for me. But how can I get the list of available options for setting the filters?
I tried capturing the error if I try to filter with non listed option, but my application is not throwing any error..!! Can you please suggest how to get that list.
Thanks,
Srinivas
I'm not sure I quite understand your question. Are you referring to the items in the dropdown list that appears when you click on the filter icon in the column header?
Hi Michael,
One more concern is - I want to validate the SwfTable is non editable. Following is one of the property of table I have.
"swftypename:=Infragistics\.Win\.UltraWinGrid\.UltraGrid"
Now am trying to use the below code to validate the concern.
SwfWindow(".*").SwfWindow(".*").SWfTable(".*").ActivateCell "0","Countries"
CellActivation = SwfWindow(".*").SwfWindow(".*").SWfTable(".*").GetNAProperty("ActiveCell.Column.CellActivation")
If CellActivation=3 Then
msgbox "field non editable"
else
msgbox "fail"
but the above code is giving me the following error:
Unable to find assembly 'Infragistics2.Win.UltraWinGrid.v9.1, Version=9.1.20091.1000, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb'.
Please let me know how to resolve the error. Or is there any work around to achieve the goal?
Regards,
Jhimi
Hi All,
Am also facing the same above issue. while doing filter ,it able to select and focus but filtering is not happening.
please, can you assist me to get the solution for this behavior?
Environment details:
TA 2012.2 , QTP 11, .net Framewor -4.0 and installed all addon in qtp.
Code:
SwfWindow().SwfWindow().Swftable().SetFilter "0;COLUMNKEY","COLUMNVALUE"
tried another below way but no luck:
call SwfWindow("").SwfWindow("S").SwfTable("").Object.DisplayLayout.Rows.ColumnFilters("COMPANY").FilterConditions.Add(FilterComparisionOperator.Equals, "XYZ")