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

org.openqa.selenium.devtools.v88.domsnapshot.model.ComputedStyle Maven / Gradle / Ivy

package org.openqa.selenium.devtools.v88.domsnapshot.model;

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

/**
 * A subset of the full ComputedStyle as defined by the request whitelist.
 */
public class ComputedStyle {

    private final java.util.List properties;

    public ComputedStyle(java.util.List properties) {
        this.properties = java.util.Objects.requireNonNull(properties, "properties is required");
    }

    /**
     * Name/value pairs of computed style properties.
     */
    public java.util.List getProperties() {
        return properties;
    }

    private static ComputedStyle fromJson(JsonInput input) {
        java.util.List properties = null;
        input.beginObject();
        while (input.hasNext()) {
            switch(input.nextName()) {
                case "properties":
                    properties = input.read(new com.google.common.reflect.TypeToken>() {
                    }.getType());
                    break;
                default:
                    input.skipValue();
                    break;
            }
        }
        input.endObject();
        return new ComputedStyle(properties);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy