def _getApplication(self):
app = self<EOL>while True:<EOL><INDENT>try:<EOL><INDENT>app = app.AXParent<EOL><DEDENT>except _a11y.ErrorUnsupported:<EOL><INDENT>break<EOL><DEDENT><DEDENT>return app<EOL>
Get the base application UIElement.

        If the UIElement is a child of the application, it will try
        to get the AXParent until it reaches the top application level
        element.