GNOME Bugzilla – Bug 345667
Need Dogtail to recognize selected items in combo-boxes
Last modified: 2006-10-10 21:11:31 UTC
Please describe the problem: One of the tests that I'd like to build will be to verify that data as displayed in a GUI matches some persistent data store. To do this, the test script will 'walk' the GUI and examine the value in each displayed field. This works fine for fields that have a "text" attribute, but it cannot return the currently selected value for a combo box. It looks like Dogtail cannot determine the currently selected value. Performing a "dump" statement on the combo box returns the following - how can a Dogtail script determine which value is currently selected? {child with name="observerTypeComboBox" roleName='combo box'} press Node roleName='menu' name='' description='' Node roleName='menu item' name='Exec Observer' description='' text='' click Node roleName='menu item' name='Fork Observer' description='' text='' click Node roleName='menu item' name='Task Terminating Observer' description='' text='' click Node roleName='menu item' name='TaskCloneObserver' description='' text='' click Node roleName='menu item' name='Syscall Observer' description='' text='' click Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information:
There's a feature that's not currently documented (though it should be): Node.isSelected so you can check if each 'menu item' is selected. Does that work for you?
Is that a method/function that returns a boolean? I'm seeing this when I try to run it on the combo box menu items or the combo box itself. I'm running dogtail: dogtail-0.5.1-3.fc5 AttributeError: isSelected
Oh, I should have noticed; that might only be in CVS. I'll be making a new release very soon, though.
Should be fixed in 0.6.0.