Example usage for org.openqa.selenium.logging LogEntries LogEntries

List of usage examples for org.openqa.selenium.logging LogEntries LogEntries

Introduction

In this page you can find the example usage for org.openqa.selenium.logging LogEntries LogEntries.

Prototype

public LogEntries(Iterable<LogEntry> entries) 

Source Link

Usage

From source file:com.machinepublishers.jbrowserdriver.Entries.java

License:Apache License

LogEntries toLogEntries() {
    List<LogEntry> list = new ArrayList<LogEntry>();
    for (Entry entry : entries) {
        list.add(entry.toLogEntry());/*  www .  j a v  a 2s  .  c o  m*/
    }
    return new LogEntries(list);
}

From source file:com.opera.core.systems.OperaLogs.java

License:Apache License

public LogEntries get(String logType) {
    Iterable<LogEntry> toReturn = getLocalLogs(logType);
    localLogs.remove(logType);
    return new LogEntries(toReturn);
}

From source file:org.musetest.selenium.mocks.MuseMockDriver.java

License:Open Source License

@Override
public Options manage() {
    return new Options() {
        @Override/*from w  w  w . ja va2s  . co m*/
        public void addCookie(Cookie cookie) {

        }

        @Override
        public void deleteCookieNamed(String name) {

        }

        @Override
        public void deleteCookie(Cookie cookie) {

        }

        @Override
        public void deleteAllCookies() {

        }

        @Override
        public Set<Cookie> getCookies() {
            return null;
        }

        @Override
        public Cookie getCookieNamed(String name) {
            return null;
        }

        @Override
        public Timeouts timeouts() {
            return null;
        }

        @Override
        public ImeHandler ime() {
            return null;
        }

        @Override
        public Window window() {
            return null;
        }

        @Override
        public Logs logs() {
            return new Logs() {
                @Override
                public LogEntries get(String logType) {
                    LogEntry entry = new LogEntry(Level.ALL, System.currentTimeMillis(), new String(_log));
                    return new LogEntries(Collections.singleton(entry));
                }

                @Override
                public Set<String> getAvailableLogTypes() {
                    return Collections.singleton("only-one");
                }
            };
        }
    };
}