chrome/test/chromedriver/log_replay/client_replay.py
def NextCommand(self, previous_response):
    """Get the next command in the log file.

    Gets start of next command, returning the command and response,
    ready to be executed directly in the new session.

    Args:
      previous_response: the response payload from running the previous command
        outputted by this function; None if this is the first command, or
        element, session, and window ID substitution is not desired (i.e.
        use the logged IDs). This provides the IDs that are then mapped
        back onto the ones in the log to formulate future commands correctly.
    Raises:
      ReplayException: there is a problem with the log making it not
        parseable.
    Returns:
      None if there are no remaining logs.
      Otherwise, |command|, a LogEntry object with the following fields:
        name: command name (e.g. InitSession)
        type: either LogEntry.COMMAND or LogEntry.RESPONSE
        payload: parameters passed with the command
        session_id: intended session ID for the command, or "" if the
          command is GetSessions.
    """
    if previous_response:
      self._IngestRealResponse(previous_response)

    command = self._parser.GetNext()
    if not command:  # Reached end of log file
      return None
    if not command.IsCommand():
      raise ReplayException("Command and Response unexpectedly out of order.")

    if command.name == "GetSessions":
      return self._HandleGetSessions(command)

    command.UpdatePayloadForReplaySession(
        self._id_map, self._binary, self._base_url)

    response = self._parser.GetNext()
    if not response:
      return command
    if not response.IsResponse():
      raise ReplayException("Command and Response unexpectedly out of order.")

    self._IngestLoggedResponse(response)
    return command
Get the next command in the log file.

    Gets start of next command, returning the command and response,
    ready to be executed directly in the new session.

    Args:
      previous_response: the response payload from running the previous command
        outputted by this function; None if this is the first command, or
        element, session, and window ID substitution is not desired (i.e.
        use the logged IDs). This provides the IDs that are then mapped
        back onto the ones in the log to formulate future commands correctly.
    Raises:
      ReplayException: there is a problem with the log making it not
        parseable.
    Returns:
      None if there are no remaining logs.
      Otherwise, |command|, a LogEntry object with the following fields:
        name: command name (e.g. InitSession)
        type: either LogEntry.COMMAND or LogEntry.RESPONSE
        payload: parameters passed with the command
        session_id: intended session ID for the command, or "" if the
          command is GetSessions.
    
Get the next command in the log file.
Gets start of next command, returning the command and response,
ready to be executed directly in the new session.
Get the next command in the log file . Gets start of next command returning the command and response ready to be executed directly in the new session .
def NextCommand(self, previous_response):
    if previous_response:
      self._IngestRealResponse(previous_response)
    command = self._parser.GetNext()
    if not command:  
      return None
    if not command.IsCommand():
      raise ReplayException("Command and Response unexpectedly out of order.")
    if command.name == "GetSessions":
      return self._HandleGetSessions(command)
    command.UpdatePayloadForReplaySession(
        self._id_map, self._binary, self._base_url)
    response = self._parser.GetNext()
    if not response:
      return command
    if not response.IsResponse():
      raise ReplayException("Command and Response unexpectedly out of order.")
    self._IngestLoggedResponse(response)
    return command
def NextCommand ( self , previous_response ) : if previous_response : self . _IngestRealResponse ( previous_response ) command = self . _parser . GetNext ( ) if not command : return None if not command . IsCommand ( ) : raise ReplayException ( "Command and Response unexpectedly out of order." ) if command . name == "GetSessions" : return self . _HandleGetSessions ( command ) command . UpdatePayloadForReplaySession ( self . _id_map , self . _binary , self . _base_url ) response = self . _parser . GetNext ( ) if not response : return command if not response . IsResponse ( ) : raise ReplayException ( "Command and Response unexpectedly out of order." ) self . _IngestLoggedResponse ( response ) return command
Get the next command in the log file.
Get the next command in the log file .
"""Get the next command in the log file.

    Gets start of next command, returning the command and response,
    ready to be executed directly in the new session.

    Args:
      previous_response: the response payload from running the previous command
        outputted by this function; None if this is the first command, or
        element, session, and window ID substitution is not desired (i.e.
        use the logged IDs). This provides the IDs that are then mapped
        back onto the ones in the log to formulate future commands correctly.
    Raises:
      ReplayException: there is a problem with the log making it not
        parseable.
    Returns:
      None if there are no remaining logs.
      Otherwise, |command|, a LogEntry object with the following fields:
        name: command name (e.g. InitSession)
        type: either LogEntry.COMMAND or LogEntry.RESPONSE
        payload: parameters passed with the command
        session_id: intended session ID for the command, or "" if the
          command is GetSessions.
    """ # Reached end of log file
None if there are no remaining logs.
Otherwise, |command|, a LogEntry object with the following fields:
name: command name
type: either LogEntry.COMMAND or LogEntry.RESPONSE
payload: parameters passed with the command
session_id: intended session ID for the command, or "" if the
command is GetSessions.
None if there are no remaining logs . Otherwise |command| a LogEntry object with the following fields : name : command name type : either LogEntry . COMMAND or LogEntry . RESPONSE payload : parameters passed with the command session_id : intended session ID for the command or " " if the command is GetSessions .
there is a problem with the log making it not
parseable.
there is a problem with the log making it not parseable .
ReplayException
self
previous_response
the response payload from running the previous command
outputted by this function; None if this is the first command, or
element, session, and window ID substitution is not desired . This provides the IDs that are then mapped
back onto the ones in the log to formulate future commands correctly.
the response payload from running the previous command outputted by this function ; None if this is the first command or element session and window ID substitution is not desired . This provides the IDs that are then mapped back onto the ones in the log to formulate future commands correctly .