use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.mobile.MobileAdsBaseObject in project selenium-tests by Wikia.
the class TestAdTypeMobile method adsAdTypeAsyncSuccessWithAd.
@Test(groups = "AdTypeMercury", dataProviderClass = AdTypeDataProvider.class, dataProvider = "asyncSuccessWithAd")
public void adsAdTypeAsyncSuccessWithAd(String wikiName, String article, String adUnit, String slotName, String imgUrl) {
String testedPage = urlBuilder.getUrlForPath(wikiName, article);
MobileAdsBaseObject ads = new MobileAdsBaseObject(driver, testedPage);
ads.waitForSlot(slotName);
ads.verifyGptIframe(adUnit, slotName, SRC);
ads.verifyImgAdLoadedInSlot(slotName, imgUrl);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.mobile.MobileAdsBaseObject in project selenium-tests by Wikia.
the class TestAdsSlotsMercury method adsLeaderboardOnPageWithInfobox.
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(groups = "AdsSlotsMercury", dataProviderClass = MobileAdsDataProvider.class, dataProvider = "leaderboardSlotOnPageWithInfobox")
public void adsLeaderboardOnPageWithInfobox(String wikiName, String article, String adUnit) {
String testedPage = urlBuilder.getUrlForPath(wikiName, article);
MobileAdsBaseObject ads = new MobileAdsBaseObject(driver, testedPage);
PortableInfobox infobox = new PortableInfobox();
ads.waitForPageLoadedWithGpt();
ads.verifyGptIframe(adUnit, MOBILE_TOP_LEADERBOARD, SRC);
int adPosition = ads.getElementTopPositionByCssSelector(AdsContent.getSlotSelector(AdsContent.MOBILE_TOP_LB));
int pageElementPosition = infobox.getElementBottomPositionByCssSelector(PORTABLE_INFOBOX);
PageObjectLogging.log("Ad top position", String.valueOf(adPosition), true);
PageObjectLogging.log("Infobox bottom position", String.valueOf(pageElementPosition), true);
Assertion.assertTrue(adPosition >= pageElementPosition, "Verify if ad top position is >= infobox bottom position (ad below infobox)");
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.mobile.MobileAdsBaseObject in project selenium-tests by Wikia.
the class TestAdsSlotsMercury method adsLeaderboardOnPageWithoutInfobox.
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(groups = "AdsSlotsMercury", dataProviderClass = MobileAdsDataProvider.class, dataProvider = "leaderboardSlotOnPageWithoutInfobox")
public void adsLeaderboardOnPageWithoutInfobox(String wikiName, String article, String adUnit) {
String testedPage = urlBuilder.getUrlForPath(wikiName, article);
MobileAdsBaseObject ads = new MobileAdsBaseObject(driver, testedPage);
ads.waitForPageLoadedWithGpt();
ads.verifyGptIframe(adUnit, MOBILE_TOP_LEADERBOARD, SRC);
int adPosition = ads.getElementTopPositionByCssSelector(AdsContent.getSlotSelector(AdsContent.MOBILE_TOP_LB));
int pageElementPosition = ads.getElementBottomPositionByCssSelector(ARTICLE_HEADER);
PageObjectLogging.log("Ad top position", String.valueOf(adPosition), true);
PageObjectLogging.log("Page header bottom position", String.valueOf(pageElementPosition), true);
Assertion.assertTrue(adPosition >= pageElementPosition, "Ad top position >= page header position (ad below page header)");
}
Aggregations