Forum Discussion

WesWhit's avatar
WesWhit
Contributor
12 months ago
Solved

Unable to assert text in WPF ListView item

I am trying to assert the text of a specific cell in a WPF ListView item.  but they are both identical except for the text. this is what I'm using to do the assertion but it's very flaky. It wil...
  • WesWhit's avatar
    10 months ago

    rraghvaniI have found the fix for this issue. If you add the WPFControlText with no value to the properties list in the name mapping. it will change the way TestComplete targets the ListView.

    which allows property checks that look like this - 

    aqObject.CheckProperty( Aliases.GDP.HwndSource_AssetsWindow.AssetsWindow.AssetList.WPFObject("ListViewItem", "", row).WPFObject("ContentPresenter", "", 2).WPFObject("Name"),"Text", cmpContains, name)

    in this code I am only manipulating the "row"   and  "Name" is the column header