winstore_app.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:wintenApps 作者: josephsl 项目源码 文件源码
def event_liveRegionChange(self, obj, nextHandler):
        if isinstance(obj, UIA) and obj.UIAElement.cachedAutomationID == "_progressText":
            if obj.name != self._appInstallProgress:
                self._appInstallProgress = obj.name
                # Don't forget to announce product title.
                productTitle = obj.parent.previous
                # Since March 2017 update, it is no longer the product name, but a progress button.
                if productTitle and productTitle.role == controlTypes.ROLE_BUTTON:
                    # But since September 2017 update, the title is next door.
                    possibleProductTitle = productTitle.parent.previous
                    productTitle = productTitle.previous if possibleProductTitle is None else productTitle.parent.previous
                if productTitle and isinstance(productTitle, UIA) and productTitle.UIAElement.cachedAutomationID == "_productTitle":
                    ui.message(" ".join([productTitle.name, obj.name]))
            return
        nextHandler()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号