Forum Discussion

AAN's avatar
AAN
Contributor
12 years ago

Bar Item Filter - Disabled when automating WPF.

Hi there,










We have quite often struggled with filtering. This time in the automation run, Test Complete is saying that the:









Bar Item 'Apply Filter' is Disabled.










I have enclosed the screen shot of what it is referring to in the WPF application.










How can I fix this issue so that Test Complete does not tell me that the Bar Item 'Apply Filter' is disabled.













This is the log:










Tested










object:










Aliases.ProjectManager_Client.HwndSource_BlackboxProjectManager.BlackboxProjectManager.Grid.FloatingContainerBorder.Grid.FloatingContainerBody.border.Grid.PART_ContainerContent.DockPanel.DockPanel.dockManagerLayoutGroup.NavigationView.grid1.ucContent.RiskSummaryExpandableUCView.Grid.expExpander.Grid.Border.GroupBox.Grid.grdRiskSummary.SavableGridLayout.BarManagerLayout










(Sys.Process("ProjectManager.Client").WPFObject("HwndSource:










BlackboxProjectManager").WPFObject("BlackboxProjectManager").WPFObject("Grid",










"", 1).WPFObject("FloatingContainerBorder").WPFObject("Grid", "",










1).WPFObject("FloatingContainerBody").WPFObject("border").WPFObject("Grid", "",










1).WPFObject("PART_ContainerContent").WPFObject("DockPanel", "",










1).WPFObject("DockPanel", "",










2).WPFObject("dockManagerLayoutGroup").WPFObject("NavigationView", "",










1).WPFObject("grid1").WPFObject("ucContent").WPFObject("RiskSummaryExpandableUCView",










"", 1).WPFObject("Grid", "", 1).WPFObject("expExpander").WPFObject("Grid", "",










1).WPFObject("Border", "", 1).WPFObject("GroupBox", "", 1).WPFObject("Grid", "",










1).WPFObject("grdRiskSummary").WPFObject("SavableGridLayout").WPFObject("BarManagerLayout"))










Now if I try and re-run after having used the Object Spy to point and fix the Filter, the re-run tells me:















My actions in trying to resolve the issue:







"Unable to perform the action because the control is disabled"









Here is the log for that:




FloatingContainerBorder").WPFObject("Grid", "",




1).WPFObject("FloatingContainerBody").WPFObject("border").WPFObject("Grid", "",




1).WPFObject("PART_ContainerContent").WPFObject("DockPanel", "",




1).WPFObject("DockPanel", "",




2).WPFObject("dockManagerLayoutGroup").WPFObject("NavigationView", "",




1).WPFObject("grid1").WPFObject("ucContent").WPFObject("RiskSummaryExpandableUCView",




"", 1).WPFObject("Grid", "", 1).WPFObject("expExpander").WPFObject("Grid", "",




1).WPFObject("Border", "", 1).WPFObject("GroupBox", "", 1).WPFObject("Grid", "",




1).WPFObject("grdRiskSummary").WPFObject("SavableGridLayout").WPFObject("BarManagerLayout").WPFObject("BarContainerControl",




"", 1).WPFObject("BarControl", "", 1).WPFObject("BarItemLinkInfo", "",




3).WPFObject("BarButtonItemLinkControl", "", 1)


























2 Replies

  • AlexeyK's avatar
    AlexeyK
    SmartBear Alumni (Retired)

    Aneez,


    In your image, the filter icon looks grayed as compared with other icons on the toolbar.

    This means that the button is disabled by your application under test.


    You need to do something to your application to "force" it to enable the button. Perhaps, you need to select an item in a list in your application, choose a row in a table, click within an edit control, and so on.

  • AAN's avatar
    AAN
    Contributor
    Hi Alex,



    The thing is I did use a filter to enable it but on playback it told me it's disabled otherwise I would not be able to click on a disabled item and automate it would I?



    Cheers,

    A.