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

org.openqa.selenium.devtools.v127.extensions.Extensions Maven / Gradle / Ivy

Go to download

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

The newest version!
package org.openqa.selenium.devtools.v127.extensions;

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;

/**
 * Defines commands and events for browser extensions. Available if the client
 * is connected using the --remote-debugging-pipe flag and
 * the --enable-unsafe-extension-debugging flag is set.
 */
@Beta()
public class Extensions {

    /**
     * Installs an unpacked extension from the filesystem similar to
     * --load-extension CLI flags. Returns extension ID once the extension
     * has been installed.
     */
    public static Command loadUnpacked(java.lang.String path) {
        java.util.Objects.requireNonNull(path, "path is required");
        LinkedHashMap params = new LinkedHashMap<>();
        params.put("path", path);
        return new Command<>("Extensions.loadUnpacked", Map.copyOf(params), ConverterFunctions.map("id", java.lang.String.class));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy