Package com.applitools.eyes
Enum CoordinatesType
- java.lang.Object
-
- java.lang.Enum<CoordinatesType>
-
- com.applitools.eyes.CoordinatesType
-
- All Implemented Interfaces:
Serializable,Comparable<CoordinatesType>
public enum CoordinatesType extends Enum<CoordinatesType>
Encapsulates the type of coordinates used by the region provider.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONTEXT_AS_ISThe coordinates should be used "as is" within the current context.CONTEXT_RELATIVECoordinates are relative to the context.SCREENSHOT_AS_ISThe coordinates should be used "as is" on the screenshot image.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CoordinatesTypevalueOf(String name)Returns the enum constant of this type with the specified name.static CoordinatesType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SCREENSHOT_AS_IS
public static final CoordinatesType SCREENSHOT_AS_IS
The coordinates should be used "as is" on the screenshot image. Regardless of the current context.
-
CONTEXT_AS_IS
public static final CoordinatesType CONTEXT_AS_IS
The coordinates should be used "as is" within the current context. For example, if we're inside a frame, the coordinates are "as is", but within the current frame's viewport.
-
CONTEXT_RELATIVE
public static final CoordinatesType CONTEXT_RELATIVE
Coordinates are relative to the context. For example, if we are in a context of a frame in a web page, then the coordinates are relative to the frame. In this case, if we want to crop an image region based on an element's region, we will need to calculate their respective "as is" coordinates.
-
-
Method Detail
-
values
public static CoordinatesType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CoordinatesType c : CoordinatesType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CoordinatesType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-