code: def waittillguiexist(self, window_name, object_name='',
                           guiTimeOut=30, state=''):
          
          timeout = 0
          while timeout < guiTimeOut:
              if self.guiexist(window_name, object_name):
                  return 1
              # Wait 1 second before retrying
              time.sleep(1)
              timeout += 1
          # Object and/or window doesn't appear within the timeout period
          return 0
docs: Wait till a window or component exists.
  
          @param window_name: Window name to look for, either full name,
          LDTP's name convention, or a Unix glob.
          @type window_name: string
          @param object_name: Object name to look for, either full name,
          LDTP's name convention, or a Unix glob.
          @type object_name: string
          @param guiTimeOut: Wait timeout in seconds
          @type guiTimeOut: integer
          @param state: Object state used only when object_name is provided.
          @type object_name: string
  
          @return: 1 if GUI was found, 0 if not.
          @rtype: integer