use of org.openqa.selenium.Dimension in project selenium-tests by Wikia.
the class VetOptionsComponentObject method verifyVideoThumbnail.
private void verifyVideoThumbnail() {
wait.forElementVisible(videoThumbnail);
Dimension dim = videoThumbnail.getSize();
int w = dim.getWidth();
Assertion.assertEquals(w, VIDEO_THUMBNAIL_WIDTH);
PageObjectLogging.log("verifyVideoThumbnail", "video thumbnail is visible", true);
}
use of org.openqa.selenium.Dimension in project selenium-tests by Wikia.
the class ArticlePageObject method verifyTableSize.
public void verifyTableSize(int width, int height) {
wait.forElementVisible(table);
Dimension size = table.getSize();
Assertion.assertEquals(size.getHeight(), height);
Assertion.assertEquals(size.getWidth(), width);
PageObjectLogging.log("verifyTableSize", "table has correct size", true);
}
use of org.openqa.selenium.Dimension in project selenium-tests by Wikia.
the class AdsSkinHelper method getMiddleColor.
public String getMiddleColor() {
Point startPoint = new Point((articleLeftSideX + articleRightSideX) / 2, startSkinY + 3);
File pixel = shooter.capturePageAndCrop(startPoint, new Dimension(1, 1), driver);
return toHex(new Color(imageEditor.fileToImage(pixel).getRGB(0, 0)));
}
use of org.openqa.selenium.Dimension in project selenium-tests by Wikia.
the class AdsSkinHelper method getCutPattern.
private File getCutPattern(BufferedImage patternImage, boolean isLeft) {
Point startPoint;
Dimension size;
if (isLeft) {
size = new Dimension(articleLeftSideX, patternImage.getHeight());
startPoint = new Point(patternImage.getWidth() - articleLeftSideX, 0);
} else {
size = new Dimension(viewPortWidth - articleRightSideX, patternImage.getHeight());
startPoint = new Point(0, 0);
}
return imageEditor.cropImage(startPoint, size, patternImage);
}
use of org.openqa.selenium.Dimension in project selenium-tests by Wikia.
the class TestAdsSlotSizes method adsSlotSizes.
private void adsSlotSizes(Page page, String urlParamToEnable, Dimension pageSize, Map<String, Object> slotInfo) {
String slotName = slotInfo.get("slotName").toString();
Dimension slotSize = (Dimension) slotInfo.get("slotSize");
String url = urlBuilder.getUrlForPage(page);
if (StringUtils.isNotEmpty(urlParamToEnable)) {
url = urlBuilder.appendQueryStringToURL(url, urlParamToEnable);
}
log(slotName, slotSize);
new AdsBaseObject(driver, url, pageSize).triggerAdSlot(slotName).verifyLineItemId(slotName, Integer.valueOf(slotInfo.get("lineItemId").toString())).verifyIframeSize(slotName, slotInfo.get("src").toString(), slotSize.getWidth(), slotSize.getHeight());
}
Aggregations