use of org.openqa.selenium.logging.Logs in project cerberus-source by cerberustesting.
the class WebDriverService method getSeleniumLog.
@Override
public List<String> getSeleniumLog(Session session) {
List<String> result = new ArrayList();
Logs logs = session.getDriver().manage().logs();
for (String logType : logs.getAvailableLogTypes()) {
LogEntries logEntries = logs.get(logType);
result.add("********************" + logType + "********************\n");
for (LogEntry logEntry : logEntries) {
result.add(new Date(logEntry.getTimestamp()) + " : " + logEntry.getLevel() + " : " + logEntry.getMessage() + "\n");
}
}
return result;
}
Aggregations