python - Click on IAccessible(MSAA) element without DefaultAction -


i've been trying create automated test msaa on python using pymsaa

i faced problem when button not have defaultaction

b.accdodefaultaction()  traceback (most recent call last):   file "<stdin>", line 2, in <module>   file "msaa.py", line 215, in accdodefaultaction     self.iaccessible._iaccessible__com_accdodefaultaction(objchildid) _ctypes.comerror: (-2147352573, 'member not found.', (none, none, none, 0, none) ) 

i found out absence of defaultaction normal.

is there way make click(double-click) on such elements? send event, etc... thinking clicking coordinates, may not idea.

thanks

sending mouse click possible (using sendinput or python equivalent). thing have first verify clickable point going object want click (i.e., clickable point might obscured window/control).

you can use accessibleobjectfrompoint (this seems wrapped msaa.point in pymsaa) check accessible object under point in fact same object you're trying click.

now can check various points in acclocation find clickable point. best initial point center; if fails, try points @ 1/3, 1/2, 2/3s of width (or height, appropriate) in both x , y directions.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -