Bugzilla – Bug 509276
PrintPreviewDialog: All zoom menu items have the "checked" state
Last modified: 2009-07-29 07:38:39 UTC
PROBLEM STATEMENT When the zoom toggle button (the button with the magnifying glass icon on the tool bar) of the PrintPreviewDialog is clicked, a new "window" accessible appears that has a "menu" child. This "menu" accessible has several "menu item" accessibles. The problem is that all the "menu item" accessibles have the "checked" state. Only one menu item can be selected in the GUI, so only one "menu item" accessible should have the "checked" state. REPRO 1. Run uia2atk/test/samples/printpreviewdialog.py and click on the "PrintPreviewDialog" button. 2. Run the attached script, which performs the "click" action of the "menu" accessible to open it and then prints the states of all of the menu items. RESULTS All of the menu items have the "checked" states EXPECTED RESULTS Exactly one menu item--the one that is checked on the GUI--should have the "checked" state. By default the "Auto" menu item is checked. COMMENTS If you close the zoom menu and run the script a second time without closing the PrintPreviewDialog or changing anything else on the GUI, then none of the menu items have the "checked" state.
Created attachment 295847 [details] pyatspi script referenced in REPRO steps
I think that this is caused by the MenuItem SelectionItem behavior always returning true for IsSelected. I'm curious if there's a reason for this behavior.
(In reply to comment #2) > I think that this is caused by the MenuItem SelectionItem behavior always > returning true for IsSelected. I'm curious if there's a reason for this > behavior. The reason is that I mistakenly thought that setting RadioCheck=True alone would cause the checked RadioButton to appear, but it turns out you must also set Checked=True as well. I just tested on Vista, and if you set RadioCheck=True and Checked=False, the item *should* implement SelectionItem and IsSelected should False. So Mike's right, and IsSelected should return item.Checked. Sorry for the confusion!
Waiting for review.
Fixed in UIAutomationWinforms R138843 (trunk) and 138844 (1.0 branch).
test on: mono-core-138178-1486.src.rpm mono-uia-132785-276.src.rpm uiaatkbridge-138148-675.src.rpm uiautomationwinforms-138872-683.src.rpm Revision: 138918