@staticmethod
def _get_moniker(view):
    """
        Tries to determine a human-readable string for a view.
        """
    label = view.get('userLabel')
    if label:
        return label
    if view.tag == 'imageView':
        return view.get('image')
    if view.tag == 'button':
        state_normal = view.find("./state[@key='normal']")
        if state_normal is not None:
            return state_normal.get('title') or state_normal.get('image')
    return None
