def __init__(self, name=None, roleName=None, description=None, label=None, debugName=None): if name: self.name = TranslatableString(name) else: self.name = None self.roleName = roleName self.description = description if label: self.label = TranslatableString(label) else: self.label = None if debugName: self.debugName = debugName else: if label: self.debugName = "labelled '%s'" % self.label else: self.debugName = "child with" if name: self.debugName += " name=%s" % self.name if roleName: self.debugName += " roleName='%s'" % roleName if description: self.debugName += " description='%s'" % description assert self.debugName self.satisfiedByNode = self._genCompareFunc()
def __init__(self, tabName): self.tabName = TranslatableString(tabName) self.debugName = self.describeSearchResult() self.satisfiedByNode = lambda node: node.roleName == 'page tab' and stringMatches( self.tabName, node.name)
def __init__(self, buttonName): self.buttonName = TranslatableString(buttonName) self.debugName = self.describeSearchResult() self.satisfiedByNode = lambda node: node.roleName == 'push button' and stringMatches( self.buttonName, node.name)
def __init__(self, menuItemName): self.menuItemName = TranslatableString(menuItemName) self.debugName = self.describeSearchResult() self.satisfiedByNode = lambda node: \ node.roleName.endswith('menu item') and stringMatches(self.menuItemName, node.name)
def __init__(self, labelText): self.labelText = TranslatableString(labelText) self.debugName = self.describeSearchResult() self.satisfiedByNode = self._genCompareFunc()
def __init__(self, dialogName): self.dialogName = TranslatableString(dialogName) self.debugName = self.describeSearchResult() self.satisfiedByNode = self._genCompareFunc()
def __init__(self, appName, description=None): self.appName = TranslatableString(appName) self.debugName = self.describeSearchResult() self.satisfiedByNode = self._genCompareFunc() self.description = TranslatableString(description)