本文整理匯總了Python中IAccessibleHandler.accNavigate方法的典型用法代碼示例。如果您正苦於以下問題:Python IAccessibleHandler.accNavigate方法的具體用法?Python IAccessibleHandler.accNavigate怎麽用?Python IAccessibleHandler.accNavigate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類IAccessibleHandler
的用法示例。
在下文中一共展示了IAccessibleHandler.accNavigate方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _get_parent
# 需要導入模塊: import IAccessibleHandler [as 別名]
# 或者: from IAccessibleHandler import accNavigate [as 別名]
def _get_parent(self):
#Special code to support Mozilla node_child_of relation (for comboboxes)
res=IAccessibleHandler.accNavigate(self.IAccessibleObject,self.IAccessibleChildID,IAccessibleHandler.NAVRELATION_NODE_CHILD_OF)
if res and res!=(self.IAccessibleObject,self.IAccessibleChildID):
newObj=IAccessible(IAccessibleObject=res[0],IAccessibleChildID=res[1])
if newObj:
return newObj
return super(Mozilla,self).parent
示例2: _get_parent
# 需要導入模塊: import IAccessibleHandler [as 別名]
# 或者: from IAccessibleHandler import accNavigate [as 別名]
def _get_parent(self):
#Special code to support Mozilla node_child_of relation (for comboboxes)
res=IAccessibleHandler.accNavigate(self.IAccessibleObject,self.IAccessibleChildID,IAccessibleHandler.NAVRELATION_NODE_CHILD_OF)
if res and res!=(self.IAccessibleObject,self.IAccessibleChildID):
#Gecko can sometimes give back a broken application node with a windowHandle of 0
#The application node is annoying, even if it wasn't broken
#So only use the node_child_of object if it has a valid IAccessible2 windowHandle
try:
windowHandle=res[0].windowHandle
except (COMError,AttributeError):
windowHandle=None
if windowHandle:
newObj=IAccessible(windowHandle=windowHandle,IAccessibleObject=res[0],IAccessibleChildID=res[1])
if newObj:
return newObj
return super(Mozilla,self).parent
示例3: _get_parent
# 需要導入模塊: import IAccessibleHandler [as 別名]
# 或者: from IAccessibleHandler import accNavigate [as 別名]
def _get_parent(self):
parent = super(GeckoPluginWindowRoot, self).parent
if parent.IAccessibleRole == oleacc.ROLE_SYSTEM_CLIENT:
# Skip the window wrapping the plugin window,
# which doesn't expose a Gecko accessible in Gecko >= 11.
parent = parent.parent.parent
ver = getGeckoVersion(parent)
if ver and ver.major != 1:
res = IAccessibleHandler.accNavigate(parent.IAccessibleObject, 0, IAccessibleHandler.NAVRELATION_EMBEDS)
if res:
obj = IAccessible(IAccessibleObject=res[0], IAccessibleChildID=res[1])
if obj:
if controlTypes.STATE_OFFSCREEN not in obj.states:
return obj
else:
log.debugWarning("NAVRELATION_EMBEDS returned an offscreen document, name %r" % obj.name)
else:
log.debugWarning("NAVRELATION_EMBEDS returned an invalid object")
else:
log.debugWarning("NAVRELATION_EMBEDS failed")
return parent
示例4: appliesTo
# 需要導入模塊: import IAccessibleHandler [as 別名]
# 或者: from IAccessibleHandler import accNavigate [as 別名]
def appliesTo(cls, obj):
return obj.childCount > 0 and not IAccessibleHandler.accNavigate(
obj.IAccessibleObject, obj.IAccessibleChildID, oleacc.NAVDIR_FIRSTCHILD
)