本文整理汇总了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
)