org.openqa.selenium.devtools.deviceorientation.DeviceOrientation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of selenium-devtools Show documentation
Show all versions of selenium-devtools Show documentation
Selenium automates browsers. That's it! What you do with that power is entirely up to you.
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());
}
}