Package com.applitools.eyes.positioning
Interface PositionProvider
public interface PositionProvider
Encapsulates page/element positioning.
-
Method Summary
Modifier and TypeMethodDescriptioncom.applitools.eyes.Locationcom.applitools.eyes.RectangleSizegetState()Get the current state of the position provider.voidrestoreState(PositionMemento state) Restores the state of the position provider to the state provided as a parameter.com.applitools.eyes.LocationsetPosition(com.applitools.eyes.Location location) Go to the specified location.
-
Method Details
-
getCurrentPosition
com.applitools.eyes.Location getCurrentPosition()- Returns:
- The current position, or
nullif position is not available.
-
setPosition
com.applitools.eyes.Location setPosition(com.applitools.eyes.Location location) Go to the specified location.- Parameters:
location- The position to set.
-
getEntireSize
com.applitools.eyes.RectangleSize getEntireSize()- Returns:
- The entire size of the container which the position is relative to.
-
getState
PositionMemento getState()Get the current state of the position provider. This is different fromgetCurrentPosition()in that the state of the position provider might include other model than just the coordinates. For example a CSS translation based position provider (in WebDriver based SDKs), might save the entire "transform" style value as its state.- Returns:
- The current state of the position provider, which can later be
restored by passing it as a parameter to
restoreState(com.applitools.eyes.positioning.PositionMemento).
-
restoreState
Restores the state of the position provider to the state provided as a parameter.- Parameters:
state- The state to restore to.
-