def get_terminate_button(self) :
if self.terminateButton != None : return
obj = api.getFocusObject()
while (obj.parent is not None) :
if (obj.role == controlTypes.ROLE_TABCONTROL) and (obj.name == 'Console') :
break
obj = obj.parent
if obj.name != "Console" : return
while obj.role is not controlTypes.ROLE_TOOLBAR :
obj = obj.firstChild
for i in xrange(1,obj.childCount) :
if obj.IAccessibleObject.accName(i) == "Terminate" :
self.terminateButton = obj.children[i-1]
return
评论列表
文章目录