Class DeviceRotation

java.lang.Object
org.openqa.selenium.DeviceRotation

public class DeviceRotation extends Object
Defines an object which represents the three dimensional plane and how a device can be rotated about it. Each of the axes is in positive degrees on the real number scale (0 <= deg <= 360).

Example instantiation to rotate device to "Landscape Right": DeviceRotation(0, 0, 90);

  • Constructor Details

    • DeviceRotation

      public DeviceRotation(int x, int y, int z)
      Instantiate a DeviceRotation object based on three integers.
    • DeviceRotation

      public DeviceRotation(Map<String,Number> map)
      Instantiate a DeviceRotation object based on a HashMap object where the keys are the axes x, y, and z respectively: x : xVal y : yVal z : zVal
  • Method Details

    • getX

      public int getX()
      Returns:
      The x.
    • getY

      public int getY()
      Returns:
      The y.
    • getZ

      public int getZ()
      Returns:
      The z.
    • parameters

      public Map<String,Integer> parameters()
      Returns:
      All axes mapped to a Map.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object