[LDTP-Dev] Problems with getallstates?
t izard
tizard2 at yahoo.com
Fri Nov 10 22:53:49 UTC 2017
Hi All,
Since I am only slowly getting up to speed, I don't want to call this a bug when it might just be my ignorance.
When I run the following code:
import xmlrpclib
global p
p = xmlrpclib.ServerProxy("http://192.168.146.128:4118")
p.launchapp("/home/nppdev/Downloads/HelloWorldAT")
p.getallstates('*Test', 'access_testbutton')
access_testbutton is a push button on a remote QT app, that can be enabled/disabled and made visible/hidden.
If I run p.getallstates('*Test', 'access_testbutton') when the button is visible and enabled, I get:
['enabled', 'focusable', 'sensitive', 'showing', 'visible']
If I run p.getallstates('*Test', 'access_testbutton') when the button is visible and disabled, I get:
['focusable', 'showing', 'visible']
Both great, so far
BUT
If I run p.getallstates('*Test', 'access_testbutton') when the button is hidden and enabled, I get:
['enabled', 'focusable', 'sensitive', 'showing', 'visible']
If I run p.getallstates('*Test', 'access_testbutton') when the button is hidden and disabled, I get:
['focusable', 'showing', 'visible']
So, it seems we are properly reporting the states for "enabled" and 'sensitive'
but we always report the state as 'visible', even when it is not.
I have backtracked the code (from core.py) and I believe I need to delve into the pyatspi as that is where I believe the _state.getStates() is based, that getallstates uses to determine the states but I thought I would throw this out there to see if anyone knows what might be going on before I go too far down any rabbit holes.
Thanks,
Tom
More information about the LDTP-dev
mailing list