com.applitools.eyes.selenium.positioning.SafariRegionPositionCompensation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eyes-selenium-java4 Show documentation
Show all versions of eyes-selenium-java4 Show documentation
Applitools Eyes SDK for Selenium Java WebDriver
The newest version!
package com.applitools.eyes.selenium.positioning;
import com.applitools.eyes.Region;
public class SafariRegionPositionCompensation implements RegionPositionCompensation {
@Override
public Region compensateRegionPosition(Region region, double pixelRatio) {
if (pixelRatio == 1.0) {
return region;
}
if (region.getWidth() <= 0 || region.getHeight() <= 0) {
return Region.EMPTY;
}
return region.offset(0, (int) Math.ceil(pixelRatio));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy