Java 类org.openqa.selenium.logging.SessionLogs 实例源码

项目:grid-refactor-remote-server    文件:DefaultPerSessionLogHandler.java   
/**
 * Gets all logs for a session.
 * 
 * @param sessionId The id of the session.
 * @return The logs for the session, ordered after log types in a session logs object. 
 */
@Override
public synchronized SessionLogs getAllLogsForSession(SessionId sessionId) {
  SessionLogs sessionLogs = new SessionLogs();
  if (perSessionDriverEntries.containsKey(sessionId)) {
    Map<String, LogEntries> typeToEntriesMap = perSessionDriverEntries.get(sessionId);
    for (String logType : typeToEntriesMap.keySet()) {
      sessionLogs.addLog(logType, typeToEntriesMap.get(logType));
    }
    perSessionDriverEntries.remove(sessionId);
  }
  return sessionLogs;
}
项目:grid-refactor-remote-server    文件:GetSessionLogsHandler.java   
@Override
public Map<String, SessionLogs> handle() throws Exception {
  ImmutableMap.Builder<String, SessionLogs> builder =
      ImmutableMap.<String, SessionLogs>builder();
  for (SessionId sessionId : LoggingManager.perSessionLogHandler().getLoggedSessions()) {
    builder.put(sessionId.toString(),
        LoggingManager.perSessionLogHandler().getAllLogsForSession(sessionId));
  }
  return builder.build();
}
项目:grid-refactor-remote-server    文件:NoOpSessionLogHandler.java   
@Override
public SessionLogs getAllLogsForSession(SessionId sessionId) {
  return new SessionLogs();
}
项目:grid-refactor-remote-server    文件:PerSessionLogHandler.java   
public abstract SessionLogs getAllLogsForSession(SessionId sessionId);