org.openqa.selenium.devtools.v85.log.Log Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of selenium-devtools-v85 Show documentation
Show all versions of selenium-devtools-v85 Show documentation
Selenium automates browsers. That's it! What you do with that power is entirely up to you.
package org.openqa.selenium.devtools.v85.log;
import org.openqa.selenium.Beta;
import org.openqa.selenium.devtools.Command;
import org.openqa.selenium.devtools.Event;
import org.openqa.selenium.devtools.ConverterFunctions;
import com.google.common.collect.ImmutableMap;
import org.openqa.selenium.json.JsonInput;
/**
* Provides access to log entries.
*/
public class Log {
/**
* Clears the log.
*/
public static Command clear() {
ImmutableMap.Builder params = ImmutableMap.builder();
return new Command<>("Log.clear", params.build());
}
/**
* Disables log domain, prevents further log entries from being reported to the client.
*/
public static Command disable() {
ImmutableMap.Builder params = ImmutableMap.builder();
return new Command<>("Log.disable", params.build());
}
/**
* Enables log domain, sends the entries collected so far to the client by means of the
* `entryAdded` notification.
*/
public static Command enable() {
ImmutableMap.Builder params = ImmutableMap.builder();
return new Command<>("Log.enable", params.build());
}
/**
* start violation reporting.
*/
public static Command startViolationsReport(java.util.List config) {
java.util.Objects.requireNonNull(config, "config is required");
ImmutableMap.Builder params = ImmutableMap.builder();
params.put("config", config);
return new Command<>("Log.startViolationsReport", params.build());
}
/**
* Stop violation reporting.
*/
public static Command stopViolationsReport() {
ImmutableMap.Builder params = ImmutableMap.builder();
return new Command<>("Log.stopViolationsReport", params.build());
}
public static Event entryAdded() {
return new Event<>("Log.entryAdded", ConverterFunctions.map("entry", org.openqa.selenium.devtools.v85.log.model.LogEntry.class));
}
}