Package com.applitools.eyes.selenium
Class ContextBasedScaleProvider
- java.lang.Object
-
- com.applitools.eyes.selenium.ContextBasedScaleProvider
-
- All Implemented Interfaces:
com.applitools.eyes.ScaleProvider
public class ContextBasedScaleProvider extends Object implements com.applitools.eyes.ScaleProvider
-
-
Constructor Summary
Constructors Constructor Description ContextBasedScaleProvider(com.applitools.eyes.Logger logger, com.applitools.eyes.RectangleSize topLevelContextEntireSize, com.applitools.eyes.RectangleSize viewportSize, double devicePixelRatio, boolean isMobileDevice)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getScaleRatio()
void
updateScaleRatio(int imageToScaleWidth)
Set the scale ratio based on the given image.
-
-
-
Constructor Detail
-
ContextBasedScaleProvider
public ContextBasedScaleProvider(com.applitools.eyes.Logger logger, com.applitools.eyes.RectangleSize topLevelContextEntireSize, com.applitools.eyes.RectangleSize viewportSize, double devicePixelRatio, boolean isMobileDevice)
- Parameters:
topLevelContextEntireSize
- The total size of the top level context. E.g., for selenium this would be the document size of the top level frame.viewportSize
- The viewport size.devicePixelRatio
- The device pixel ratio of the platform on which the application is running.logger
- the logger.isMobileDevice
- is mobile device.
-
-
Method Detail
-
getScaleRatio
public double getScaleRatio()
- Specified by:
getScaleRatio
in interfacecom.applitools.eyes.ScaleProvider
-
updateScaleRatio
public void updateScaleRatio(int imageToScaleWidth)
Set the scale ratio based on the given image.- Parameters:
imageToScaleWidth
- The width of the image to scale, used for calculating the scale ratio.
-
-