org.openqa.selenium.devtools.v126.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-v126 Show documentation
Show all versions of selenium-devtools-v126 Show documentation
Selenium automates browsers. That's it! What you do with that power is entirely up to you.
package org.openqa.selenium.devtools.v126.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 java.util.Map;
import java.util.LinkedHashMap;
import org.openqa.selenium.json.JsonInput;
/**
* Provides access to log entries.
*/
public class Log {
/**
* Clears the log.
*/
public static Command clear() {
LinkedHashMap params = new LinkedHashMap<>();
return new Command<>("Log.clear", Map.copyOf(params));
}
/**
* Disables log domain, prevents further log entries from being reported to the client.
*/
public static Command disable() {
LinkedHashMap params = new LinkedHashMap<>();
return new Command<>("Log.disable", Map.copyOf(params));
}
/**
* Enables log domain, sends the entries collected so far to the client by means of the
* `entryAdded` notification.
*/
public static Command enable() {
LinkedHashMap params = new LinkedHashMap<>();
return new Command<>("Log.enable", Map.copyOf(params));
}
/**
* start violation reporting.
*/
public static Command startViolationsReport(java.util.List config) {
java.util.Objects.requireNonNull(config, "config is required");
LinkedHashMap params = new LinkedHashMap<>();
params.put("config", config);
return new Command<>("Log.startViolationsReport", Map.copyOf(params));
}
/**
* Stop violation reporting.
*/
public static Command stopViolationsReport() {
LinkedHashMap params = new LinkedHashMap<>();
return new Command<>("Log.stopViolationsReport", Map.copyOf(params));
}
public static Event entryAdded() {
return new Event<>("Log.entryAdded", ConverterFunctions.map("entry", org.openqa.selenium.devtools.v126.log.model.LogEntry.class));
}
}