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
Hi Kirtee,
If you are experiencing the exact issue as described then you would need to upgrade your application to a minimum of NetAdvantage 2009 Volume 1 as well as use TestAdvantage 2009 Volume 1 with the latest service release to correct this issue. If you believe the issue may differ even slightly I would recommend starting a new thread based on your specific issue so that we can address it directly.
We're experiencing the same issue using QTP 11 and Infragistics TestAdvantage for Windows Forms (HP) 2010.3 (10.3CLR2.0 according to TestAdvantage Version Utility).
Using "SetFilter Method" on an UltraWinGrid SwfTable, the AutoFilter value is highlighted but is not selected and applied to the grid. Below are the QTP steps that select the column label, right-click, select "Auto Filter" from the context menu, and "(Custom)" or filter value is highlighted but not actually selected.
SwfWindow("Traffic / Log Management").SwfWindow("Log Editor").SwfTable("_grid").Click x, y, micRightBtn
SwfWindow("Traffic / Log Management").SwfWindow("Log Editor").SwfTable("_grid").WinMenu("ContextMenu").Select "Auto Filter"
SwfWindow("Traffic / Log Management").SwfWindow("Log Editor").SwfTable("_grid").SetFilter "0;CAT_ID", "(Custom)"
I'd appreciate your opinion as to whether this issue has returned in 2010.3 or if you have another solution.
Regards,
Jim
Jim,
I don't really understand what you are doing with this ContextMenu selection and I don't know how you are applying it to the grid. I have attached a sample application to this forum thread and I find that when I run this script in QTP11 against this sample I do not get an error. Here is the script I am using which is based on the script that you provided:
SwfWindow("Fun with Filters").SwfTable("ultraGrid1").ActivateRow "0"SwfWindow("Fun with Filters").Move 600,85SwfWindow("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", "(Custom)"
Could you test this script with the sample that I attached and let me know the result you get? Or could you modify the sample so that it more close resembles what you are testing and let me know how it goes?
Hello Michael (or other support member),
You were helping me resolve this this past May until I was diverted away from QTP testing and the issue was closed before we could find a solution. I've returned to working with QTP and have run across this same problem again. This issue I'm experiencing is exactly as described by the originator of this support thread. QTP's "SetFilter" method highlights the desired UltraWinGrid column Auto Filter selection but the selection is not actually invoked. The Auto Filter symbol in the column label remains "empty" indicating no filtering has been selected. Here's the QTP script line I'm using which highlights the grid column Auto Filter value but doesn't actually apply it to the column:
SwfWindow("Sales / Inventory Analysis").SwfWindow("Daymove").SwfTable("Main Grid").SetFilter "0;PROG_TYPE", "ROS"
I'd appreciate your help again trying to resolve this issue.
Thank you,
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?
Yes Michael. When I click on the filter icon, its displaying list of the filter options.
Michael,
I tried the below code in my application. everytime, I run this code, the application is selecting 'Countries' from the filter option but the filtering is not happening('Countries' is getting highlighted but not clicking on the same).
SwfWindow(".*").SwfTable(".*").SetFilter "0;Countries", "(Blanks)"
Please help me out. It's urgent
Hello Jhimi - I couldn't get the AutoFilter feature to work. Like you're experiencing, we only see the desired filter value selected but that filter selection is never executed on the grid. I've had some success using the "Find" feature but that's only useful if you have a specific value for which your searching. I'll be interested if you get a resolution to the Auto Filter selection actually filtering the grid results. It would sure cut down the time some of my automated tests take accounting for correct grid results.