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.
- Yan015 years agoOccasional Contributor
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
- tristaanogre5 years agoEsteemed Contributor
This is why the recording/code is using "ClickItem"... because "Save" is an item within the bar... it's not an actual button.
Again, save being "Disabled" is not the same as a button being "Disabled". YOu'll need to investigate the available list of items in the toolbar. The toolbar may have an "Item" or "Items" property that MIGHT let you drill in further to see if there's a particular state/status on the "Save" option. But again... the reason you're not getting a warning is because, due to the use of "ClickItem", there's no "disabled" property on the save button so it just clicks...
Related Content
Recent Discussions
- 14 hours agojstaehlin
- 2 days agoAivanitskiy