@classmethod<EOL><INDENT>def getAnyAppWithWindow(cls):<DEDENT>
<EOL>apps = cls._getRunningApps()<EOL>for app in apps:<EOL><INDENT>pid = app.processIdentifier()<EOL>ref = cls.getAppRefByPid(pid)<EOL>if hasattr(ref, '<STR_LIT>') and len(ref.windows()) > <NUM_LIT:0>:<EOL><INDENT>return ref<EOL><DEDENT><DEDENT>raise ValueError('<STR_LIT>')<EOL>
Get a random app that has windows.

        Raise a ValueError exception if no GUI applications are found.