Forum Discussion
I've seen it both ways, actually. If the control is disabled, I've seen warnings... and I've seen it go through. It all depends upon the implementation of the object within the application under test.
I'm assuming, in this case, the problem is in the "Save" click. The thing is, that's not exactly an "object" per say. The ClickItem method works differently than Click button. If "Save" was an actual button, you'd get a warning. Instead, it's an item in a collection so doesn't have the "disabled" property that an actual button would have. In this case, it's just a matter of it clicking on some item in a longer list.
So... in short, no, in this case there is no event or anything you can add... because there is no "disabled" property to look at.... at least, not in the "traditional" sense. What I would do is examine the UltraToolbarsDockArea object, there is probably an "Items" property which will allow you to drill down into the specific items. There MAY be a property that you can use... what I would do is add code into your script, once you know the correct property, a check to make sure that the item is available to be clicked on before you attempt it... and if it is not, throw an exception or log an error.
What is the difference between Click and Click Button? I investigate on the UltraToolbarsDockArea, it has property wItems, Save button is embedded into UltraToolbarsDockArea. It is not a single button to click. The Method I can use is either Click or DblClick, but not ClickButton. As a result, no warning will popup After I click "Save" when it is disabled. Is there any alternative way to solve the problem.
Thanks