Package com.applitools.eyes.positioning
Interface PositionProvider
-
public interface PositionProvider
Encapsulates page/element positioning.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.applitools.eyes.Location
getCurrentPosition()
com.applitools.eyes.RectangleSize
getEntireSize()
PositionMemento
getState()
Get the current state of the position provider.void
restoreState(PositionMemento state)
Restores the state of the position provider to the state provided as a parameter.com.applitools.eyes.Location
setPosition(com.applitools.eyes.Location location)
Go to the specified location.
-
-
-
Method Detail
-
getCurrentPosition
com.applitools.eyes.Location getCurrentPosition()
- Returns:
- The current position, or
null
if 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
void restoreState(PositionMemento state)
Restores the state of the position provider to the state provided as a parameter.- Parameters:
state
- The state to restore to.
-
-