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

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

Go to download

Selenium automates browsers. That's it! What you do with that power is entirely up to you.

There is a newer version: 4.19.1
Show newest version
package org.openqa.selenium.devtools.v121.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 java.util.Map;
import java.util.LinkedHashMap;
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() {
        LinkedHashMap params = new LinkedHashMap<>();
        return new Command<>("Console.clearMessages", Map.copyOf(params));
    }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy