After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 345667 - Need Dogtail to recognize selected items in combo-boxes
Need Dogtail to recognize selected items in combo-boxes
Status: RESOLVED FIXED
Product: dogtail
Classification: Deprecated
Component: Framework
0.5.x
Other All
: Normal normal
: ---
Assigned To: Dogtail Maintainers
Dogtail Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-06-22 15:33 UTC by Len DiMaggio
Modified: 2006-10-10 21:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Len DiMaggio 2006-06-22 15:33:52 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:
Comment 1 Zack Cerza 2006-06-22 15:47:09 UTC
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?
Comment 2 Len DiMaggio 2006-06-22 16:28:44 UTC
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
Comment 3 Zack Cerza 2006-06-22 16:35:39 UTC
Oh, I should have noticed; that might only be in CVS. I'll be making a new release very soon, though.
Comment 4 Zack Cerza 2006-10-10 21:11:31 UTC
Should be fixed in 0.6.0.