本文整理匯總了Python中IAccessibleHandler.accParent方法的典型用法代碼示例。如果您正苦於以下問題:Python IAccessibleHandler.accParent方法的具體用法?Python IAccessibleHandler.accParent怎麽用?Python IAccessibleHandler.accParent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類IAccessibleHandler
的用法示例。
在下文中一共展示了IAccessibleHandler.accParent方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _get_parent
# 需要導入模塊: import IAccessibleHandler [as 別名]
# 或者: from IAccessibleHandler import accParent [as 別名]
def _get_parent(self):
acc = IAccessibleHandler.accParent(self.IAccessibleObject, 0)
if not acc:
return super(IAccessible,self).parent
# HACK: WindowFromAccessibleObject fails on some WebKit objects retrieved using accParent.
# The window handle is the same for all nodes in a document anyway.
# Note that WindowFromAccessibleObject seems to work for children and siblings,
# so we don't need to do this for those.
return IAccessible(IAccessibleObject=acc[0], IAccessibleChildID=0, windowHandle=self.windowHandle)