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

org.openqa.selenium.devtools.v121.animation.Animation 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.v121.animation;

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;

@Beta()
public class Animation {

    /**
     * Disables animation domain notifications.
     */
    public static Command disable() {
        LinkedHashMap params = new LinkedHashMap<>();
        return new Command<>("Animation.disable", Map.copyOf(params));
    }

    /**
     * Enables animation domain notifications.
     */
    public static Command enable() {
        LinkedHashMap params = new LinkedHashMap<>();
        return new Command<>("Animation.enable", Map.copyOf(params));
    }

    /**
     * Returns the current time of the an animation.
     */
    public static Command getCurrentTime(java.lang.String id) {
        java.util.Objects.requireNonNull(id, "id is required");
        LinkedHashMap params = new LinkedHashMap<>();
        params.put("id", id);
        return new Command<>("Animation.getCurrentTime", Map.copyOf(params), ConverterFunctions.map("currentTime", java.lang.Number.class));
    }

    /**
     * Gets the playback rate of the document timeline.
     */
    public static Command getPlaybackRate() {
        LinkedHashMap params = new LinkedHashMap<>();
        return new Command<>("Animation.getPlaybackRate", Map.copyOf(params), ConverterFunctions.map("playbackRate", java.lang.Number.class));
    }

    /**
     * Releases a set of animations to no longer be manipulated.
     */
    public static Command releaseAnimations(java.util.List animations) {
        java.util.Objects.requireNonNull(animations, "animations is required");
        LinkedHashMap params = new LinkedHashMap<>();
        params.put("animations", animations);
        return new Command<>("Animation.releaseAnimations", Map.copyOf(params));
    }

    /**
     * Gets the remote object of the Animation.
     */
    public static Command resolveAnimation(java.lang.String animationId) {
        java.util.Objects.requireNonNull(animationId, "animationId is required");
        LinkedHashMap params = new LinkedHashMap<>();
        params.put("animationId", animationId);
        return new Command<>("Animation.resolveAnimation", Map.copyOf(params), ConverterFunctions.map("remoteObject", org.openqa.selenium.devtools.v121.runtime.model.RemoteObject.class));
    }

    /**
     * Seek a set of animations to a particular time within each animation.
     */
    public static Command seekAnimations(java.util.List animations, java.lang.Number currentTime) {
        java.util.Objects.requireNonNull(animations, "animations is required");
        java.util.Objects.requireNonNull(currentTime, "currentTime is required");
        LinkedHashMap params = new LinkedHashMap<>();
        params.put("animations", animations);
        params.put("currentTime", currentTime);
        return new Command<>("Animation.seekAnimations", Map.copyOf(params));
    }

    /**
     * Sets the paused state of a set of animations.
     */
    public static Command setPaused(java.util.List animations, java.lang.Boolean paused) {
        java.util.Objects.requireNonNull(animations, "animations is required");
        java.util.Objects.requireNonNull(paused, "paused is required");
        LinkedHashMap params = new LinkedHashMap<>();
        params.put("animations", animations);
        params.put("paused", paused);
        return new Command<>("Animation.setPaused", Map.copyOf(params));
    }

    /**
     * Sets the playback rate of the document timeline.
     */
    public static Command setPlaybackRate(java.lang.Number playbackRate) {
        java.util.Objects.requireNonNull(playbackRate, "playbackRate is required");
        LinkedHashMap params = new LinkedHashMap<>();
        params.put("playbackRate", playbackRate);
        return new Command<>("Animation.setPlaybackRate", Map.copyOf(params));
    }

    /**
     * Sets the timing of an animation node.
     */
    public static Command setTiming(java.lang.String animationId, java.lang.Number duration, java.lang.Number delay) {
        java.util.Objects.requireNonNull(animationId, "animationId is required");
        java.util.Objects.requireNonNull(duration, "duration is required");
        java.util.Objects.requireNonNull(delay, "delay is required");
        LinkedHashMap params = new LinkedHashMap<>();
        params.put("animationId", animationId);
        params.put("duration", duration);
        params.put("delay", delay);
        return new Command<>("Animation.setTiming", Map.copyOf(params));
    }

    public static Event animationCanceled() {
        return new Event<>("Animation.animationCanceled", ConverterFunctions.map("id", java.lang.String.class));
    }

    public static Event animationCreated() {
        return new Event<>("Animation.animationCreated", ConverterFunctions.map("id", java.lang.String.class));
    }

    public static Event animationStarted() {
        return new Event<>("Animation.animationStarted", ConverterFunctions.map("animation", org.openqa.selenium.devtools.v121.animation.model.Animation.class));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy