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

org.openqa.selenium.devtools.deviceorientation.DeviceOrientation 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-rc-1
Show newest version
package org.openqa.selenium.devtools.deviceorientation;

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;

@Beta()
public class DeviceOrientation {

    /**
     * Clears the overridden Device Orientation.
     */
    public static Command clearDeviceOrientationOverride() {
        ImmutableMap.Builder params = ImmutableMap.builder();
        return new Command<>("DeviceOrientation.clearDeviceOrientationOverride", params.build());
    }

    /**
     * Overrides the Device Orientation.
     */
    public static Command setDeviceOrientationOverride(java.lang.Number alpha, java.lang.Number beta, java.lang.Number gamma) {
        java.util.Objects.requireNonNull(alpha, "alpha is required");
        java.util.Objects.requireNonNull(beta, "beta is required");
        java.util.Objects.requireNonNull(gamma, "gamma is required");
        ImmutableMap.Builder params = ImmutableMap.builder();
        params.put("alpha", alpha);
        params.put("beta", beta);
        params.put("gamma", gamma);
        return new Command<>("DeviceOrientation.setDeviceOrientationOverride", params.build());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy