当前位置: 首页>>代码示例>>Python>>正文


Python IAccessibleHandler.accNavigate方法代码示例

本文整理汇总了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
开发者ID:atsuoishimoto,项目名称:tweetitloud,代码行数:10,代码来源:mozilla.py

示例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
开发者ID:Alain-Ambazac,项目名称:nvda,代码行数:18,代码来源:mozilla.py

示例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
开发者ID:daisymax,项目名称:nvda,代码行数:23,代码来源:mozilla.py

示例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
     )
开发者ID:RKelson93,项目名称:nvda,代码行数:6,代码来源:msOffice.py


注:本文中的IAccessibleHandler.accNavigate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。