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

org.openqa.selenium.devtools.v90.target.model.RemoteLocation 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.0.0-beta-4
Show newest version
package org.openqa.selenium.devtools.v90.target.model;

import org.openqa.selenium.Beta;
import org.openqa.selenium.json.JsonInput;

@org.openqa.selenium.Beta()
public class RemoteLocation {

    private final java.lang.String host;

    private final java.lang.Integer port;

    public RemoteLocation(java.lang.String host, java.lang.Integer port) {
        this.host = java.util.Objects.requireNonNull(host, "host is required");
        this.port = java.util.Objects.requireNonNull(port, "port is required");
    }

    public java.lang.String getHost() {
        return host;
    }

    public java.lang.Integer getPort() {
        return port;
    }

    private static RemoteLocation fromJson(JsonInput input) {
        java.lang.String host = null;
        java.lang.Integer port = 0;
        input.beginObject();
        while (input.hasNext()) {
            switch(input.nextName()) {
                case "host":
                    host = input.nextString();
                    break;
                case "port":
                    port = input.nextNumber().intValue();
                    break;
                default:
                    input.skipValue();
                    break;
            }
        }
        input.endObject();
        return new RemoteLocation(host, port);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy