Forum Discussion
melqaisi
14 years agoNew Contributor
Thanks alot Margaret for your
replying,
My problem is, when I execute the code without any breakpoints, the ["Text"] property is returned as an object and doesn't return text, where if i make a break points, on the if statement it returns the value of the text that i want and compare the right values.
tree["WPFObject"]("TreeViewItem", "", i)["WPFObject"]("TreeViewItem", "", x)["WPFObject"]("TreeViewItem", "", z)["WPFObject"]("Grid", "", 1)["WPFObject"]("GridViewRowPresenter", "", 1)["WPFObject"]("ContentPresenter", "", 6)["WPFObject"]("TextBlock", SLDreference, 1)["Text"]
In the test log there is no errors, because at the condition it is going to see it as an object -i mean the property text- and it compares it with a string and this result is false always
The same exact problem was happening when i use the Olevalue property and didn't know what's wrong!
is there anything wrong i am doing?
Thanks,
Mohammed.