Reputation: 41
I'm using UFT 14.01 to test Windows .NET application and I want to close the panel after filling details in it so I used this code which worked before upgrading .NET framework from 4.5 to 4.7.2
WpfWindow("MainWindow").WpfButton("panel-1").Set "Off"
And now I'm getting the error:
Object doesn't support this property or method: 'WpfWindow(...).WpfButton(...).Set'
Upvotes: 1
Views: 400
Reputation: 714
Some developers Tweak Buttons by changing their Image and Event handling to act like Checkboxes (for the user it looks like a checkbox but in the background for the OS and the Test Robot is still a Button).
In such cases typing space: WpfButton("...").Type micSpace
might do the toggle between setting it on and off, although at the end, all depends on the tweak the developer used
Upvotes: 1
Reputation: 114695
UFT's WpfButton
does not support Set
functionality (here is the list of things it supports). You are probably thinking of WpfCheckBox
(or perhaps WpfEdit
).
How did you get this line in your test? If you recorded it, this seems to be a defect in UFT, if you manually added the Set
step then it's the wrong operation for this object type. You should use UFT's object spy to see what the type of the control really is.
Another thing to consider is has this step ever worked? If so what changed in the AUT? (Application Under Test).
Upvotes: 2