All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openqa.selenium.devtools.v88.console.Console Maven / Gradle / Ivy

package org.openqa.selenium.devtools.v88.console;

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;

/**
 * This domain is deprecated - use Runtime or Log instead.
 */
@Deprecated()
public class Console {

    /**
     * Does nothing.
     */
    public static Command clearMessages() {
        ImmutableMap.Builder params = ImmutableMap.builder();
        return new Command<>("Console.clearMessages", params.build());
    }

    /**
     * Disables console domain, prevents further console messages from being reported to the client.
     */
    public static Command disable() {
        ImmutableMap.Builder params = ImmutableMap.builder();
        return new Command<>("Console.disable", params.build());
    }

    /**
     * Enables console domain, sends the messages collected so far to the client by means of the
     * `messageAdded` notification.
     */
    public static Command enable() {
        ImmutableMap.Builder params = ImmutableMap.builder();
        return new Command<>("Console.enable", params.build());
    }

    public static Event messageAdded() {
        return new Event<>("Console.messageAdded", ConverterFunctions.map("message", org.openqa.selenium.devtools.v88.console.model.ConsoleMessage.class));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy