dogtail-devel [RFC] Determine if a gui component is selectable



Hey all,

A feature that would be really handy in dogtail is the ability to
determine if a gui component is selectable/focusable or visible. An
example would be to ensure that a selected radio button activates an
associated text field: we could use this feature to be sure the text
field is then selectable.

The Node object can be used to glean some of this info with its
'showing' and 'focusable' fields, but it is rather low level (the api
doesn't seem to encourage manipulating nodes directly) and can not
cleanly be used to determine if a component is _not_ selectable as a
Node cannot be assigned to a frame or window that hasn't popped up/been
created yet.

There are 2 ways I see to solve this:

  1) Extend the existing 'Focus' capability from the procedural api to
     to return a boolean value representing if the component was focused
     or not. This is non-intrusive, fits well with an automated testing
     infrastructure, and is an easy fix. One could just attempt to focus
     on the component in question and easily determine if it is present
     and focusable. This could be a problem though as it is specific to
     the procedural API.

  2) Add utility functions to specifically test a component for
     visibility etc. This would have the benefit of being useful
     for all APIs, but would be more code, and most likely a pain
     as we would need individual functions for each type of gui
     component (isWindowVisible, isButtonVisible ...) or have
     guesswork complexity to accomodate for that.

I'm leaning towards #1, but looking for input. Anyone have any ideas, or
maybe something I've missed?

Thanks,
Cole

-- 
Cole Robinson
crobinso redhat com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]