Example #1
0
 def getActionInfo(event):
     name = helper.getNameByEvent(event)
     windowName = helper.getWindowName(event.source)
     role = event.source.getRole()
     value = ldtp-helper.getTextFieldValue(windowName, name)
     actionInfo = ActionInfo(name=name, windowName=windowName, role=role, value=value)
     return actionInfo
Example #2
0
 def getActionInfo(event):
     name = helper.getNameByAccessible(event.source.get_parent())
     value = helper.getNameByEvent(event)
     role = event.source.getRole()
     windowName = helper.getWindowName(event.source)
     actionInfo = ActionInfo(name=name, role=role, value=value, windowName=windowName)
     return actionInfo
Example #3
0
 def getActionInfo(event):
     name = helper.getNameByEvent(event)
     role = event.source.getRole()
     value = event.detail1
     windowName = helper.getWindowName(event.source)
     actionInfo = ActionInfo(name=name, role=role, value=value, windowName=windowName)
     return actionInfo
Example #4
0
 def matches(event):
     result = _matches(event, Accessibility.ROLE_MENU_ITEM,
                       ['object:state-changed:selected'])
     if result:
         ctx = context.Context()
         ctx.resetMenuItem()
         ctx.menuItemValue = helper.getNameByEvent(event)
         ctx.menuItemWindowName = helper.getWindowName(event.source)
         return _RETURN_VALUE_LATER
     else:
         if event.source.getRole() == Accessibility.ROLE_MENU_ITEM:
             ctx = context.Context()
             ctx.lastWasMenuItem = True
             ctx.menuItemValue = helper.getNameByEvent(event)
             ctx.menuItemWindowName = helper.getWindowName(event.source)
         return _RETURN_VALUE_FALSE
Example #5
0
 def getActionInfo(event):
     name = helper.getNameByEvent(event)
     value = context.Context().menuItemValue
     role = event.source.getRole()
     windowName = helper.getWindowName(event.source)
     actionInfo = ActionInfo(name=name, role=role, value=value, windowName=windowName)
     return actionInfo
Example #6
0
 def getActionInfo(event):
     role = event.source.getRole()
     windowName = helper.getWindowName(event.source)
     actionInfo = ActionInfo(windowName=windowName, role=role,
                             actionType=_ACTION_TYPE_WINDOW_OPEN)
     return actionInfo