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

org.openqa.selenium.devtools.v85.tethering.Tethering 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.26.0
Show newest version
package org.openqa.selenium.devtools.v85.tethering;

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;

/**
 * The Tethering domain defines methods and events for browser port binding.
 */
@Beta()
public class Tethering {

    /**
     * Request browser port binding.
     */
    public static Command bind(java.lang.Integer port) {
        java.util.Objects.requireNonNull(port, "port is required");
        ImmutableMap.Builder params = ImmutableMap.builder();
        params.put("port", port);
        return new Command<>("Tethering.bind", params.build());
    }

    /**
     * Request browser port unbinding.
     */
    public static Command unbind(java.lang.Integer port) {
        java.util.Objects.requireNonNull(port, "port is required");
        ImmutableMap.Builder params = ImmutableMap.builder();
        params.put("port", port);
        return new Command<>("Tethering.unbind", params.build());
    }

    public static Event accepted() {
        return new Event<>("Tethering.accepted", input -> input.read(org.openqa.selenium.devtools.v85.tethering.model.Accepted.class));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy