public class InvalidPositionProvider extends Object implements PositionProvider
PositionProvider
which throws an exception
for every method. Can be used as a placeholder until an actual
implementation is set.Constructor and Description |
---|
InvalidPositionProvider() |
Modifier and Type | Method and Description |
---|---|
Location |
getCurrentPosition() |
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.
|
Location |
setPosition(Location location)
Go to the specified location.
|
public Location getCurrentPosition()
getCurrentPosition
in interface PositionProvider
null
if position is not
available.public Location setPosition(Location location)
PositionProvider
setPosition
in interface PositionProvider
location
- The position to set.public RectangleSize getEntireSize()
getEntireSize
in interface PositionProvider
public PositionMemento getState()
PositionProvider
PositionProvider.getCurrentPosition()
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.getState
in interface PositionProvider
PositionProvider.restoreState(com.applitools.eyes.positioning.PositionMemento)
.public void restoreState(PositionMemento state)
PositionProvider
restoreState
in interface PositionProvider
state
- The state to restore to.Copyright © 2019. All rights reserved.