Forum Discussion
Abramova
Staff
14 years agoHi Muthu,
To filter the values in the needed column, you can try following the steps below:
1. Use the HoverMouseColumnHeader method to move the mouse pointer to the header of the specified grid column.
2. Use the MouseX and MouseY properties to get the current screen-relative horizontal and vertical coordinates of the mouse cursor.
3. Using the MouseY property, increase the vertical coordinate's value of the mouse cursor, for example by 15 pixels. This will move the mouse pointer to the filter cell that is placed under the column header.
4. Call the Click action and use the mouse cursor's coordinates to simulate a click. For example:
gridTableControl.Click(Sys.Desktop.MouseX, Sys.Desktop.MouseY)
5. Use the ClickItem action of the combo box control to select the needed combo box item. You have already recorded this action, and you can use this code in your test:
petrel.WinFormsObject("PopupHost", "").WinFormsObject("GridDropDownContainer", "").WinFormsObject("GridComboBoxListBoxPart", "").ClickItem("G1B");