use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsBtfBlocking method adsAtfDisableBtfExceptHighlyViewableSlotsOasis.
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "disableBtfExceptHighlyViewableSlots", groups = "AdsBtfBlockingOasis")
public void adsAtfDisableBtfExceptHighlyViewableSlotsOasis(String wikiName, String article, boolean isWgVarOn) {
PageObjectLogging.log("$wgAdDriverDelayBelowTheFold", String.valueOf(isWgVarOn), true);
String testedPage = urlBuilder.getUrlForPath(wikiName, article);
AdsBaseObject adsBaseObject = new AdsBaseObject(driver, testedPage, DESKTOP_PAGE_SIZE);
adsBaseObject.waitForPageLoadedWithGpt();
Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.MEDREC), String.format("Ad is not loaded inside %s", AdsContent.MEDREC));
Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.TOP_LB), String.format("Ad is not loaded inside %s", AdsContent.TOP_LB));
Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.INVISIBLE_SKIN), String.format("Ad is not loaded inside %s", AdsContent.INVISIBLE_SKIN));
Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.INVISIBLE_HIGH_IMPACT_2), String.format("Ad is not loaded inside %s", AdsContent.INVISIBLE_HIGH_IMPACT_2));
Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.FLOATING_MEDREC), String.format("Ad is not loaded inside %s", AdsContent.FLOATING_MEDREC));
Assertion.assertNotEquals(adsBaseObject.checkSlotOnPageLoaded(AdsContent.PREFOOTER_LEFT), isWgVarOn, AdsContent.PREFOOTER_LEFT);
Assertion.assertNotEquals(adsBaseObject.checkSlotOnPageLoaded(AdsContent.PREFOOTER_RIGHT), isWgVarOn, AdsContent.PREFOOTER_RIGHT);
Assertion.assertNotEquals(adsBaseObject.checkSlotOnPageLoaded(AdsContent.LEFT_SKYSCRAPPER_2), isWgVarOn, AdsContent.LEFT_SKYSCRAPPER_2);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsBtfBlocking method adsAtfDisableBtfMercury.
@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5, browser = Browser.CHROME)
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "disableBtf", groups = "AdsBtfBlockingMercury")
public void adsAtfDisableBtfMercury(String wikiName, String article, boolean isWgVarOn) {
PageObjectLogging.log("$wgAdDriverDelayBelowTheFold", String.valueOf(isWgVarOn), true);
String testedPage = urlBuilder.getUrlForPath(wikiName, article);
AdsBaseObject adsBaseObject = new AdsBaseObject(driver, testedPage, MOBILE_SIZE);
adsBaseObject.waitForPageLoadedWithGpt();
Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.MOBILE_TOP_LB), AdsContent.MOBILE_TOP_LB);
Assertion.assertNotEquals(adsBaseObject.checkSlotOnPageLoaded(AdsContent.MOBILE_AD_IN_CONTENT), isWgVarOn, AdsContent.MOBILE_AD_IN_CONTENT);
Assertion.assertNotEquals(adsBaseObject.checkSlotOnPageLoaded(AdsContent.MOBILE_PREFOOTER), isWgVarOn, AdsContent.MOBILE_PREFOOTER);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsBtfBlocking method adsAtfDisableBtfOasis.
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "disableBtf", groups = "AdsBtfBlockingOasis")
public void adsAtfDisableBtfOasis(String wikiName, String article, boolean isWgVarOn) {
PageObjectLogging.log("$wgAdDriverDelayBelowTheFold", String.valueOf(isWgVarOn), true);
String testedPage = urlBuilder.getUrlForPath(wikiName, article);
AdsBaseObject adsBaseObject = new AdsBaseObject(driver, testedPage, DESKTOP_PAGE_SIZE);
adsBaseObject.waitForPageLoadedWithGpt();
Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.MEDREC));
Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.TOP_LB));
Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.INVISIBLE_SKIN));
Assertion.assertNotEquals(adsBaseObject.checkSlotOnPageLoaded(AdsContent.PREFOOTER_LEFT), isWgVarOn, AdsContent.PREFOOTER_LEFT);
Assertion.assertNotEquals(adsBaseObject.checkSlotOnPageLoaded(AdsContent.PREFOOTER_RIGHT), isWgVarOn, AdsContent.PREFOOTER_RIGHT);
Assertion.assertNotEquals(adsBaseObject.checkSlotOnPageLoaded(AdsContent.LEFT_SKYSCRAPPER_2), isWgVarOn, AdsContent.LEFT_SKYSCRAPPER_2);
Assertion.assertNotEquals(adsBaseObject.checkSlotOnPageLoaded(AdsContent.FLOATING_MEDREC), isWgVarOn, AdsContent.FLOATING_MEDREC);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsDetection method assertPixelWithDetectionStatus.
private void assertPixelWithDetectionStatus(Page wiki, String urlParam, String pixelPattern) {
networkTrafficInterceptor.startIntercepting();
String url = urlBuilder.getUrlForPage(wiki);
url = urlBuilder.appendQueryStringToURL(url, urlParam);
AdsBaseObject adsBaseObject = new AdsBaseObject(driver, url);
adsBaseObject.wait.forSuccessfulResponseByUrlPattern(networkTrafficInterceptor, pixelPattern);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsGptPageParam method adsGptPageParamOasis.
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsGptPageParam", groups = "AdsGptPageParamOasis")
@UseUnstablePageLoadStrategy
public void adsGptPageParamOasis(String wikiName, String article, String gptPattern, Boolean paramShouldPresent) {
AdsBaseObject wikiPage = new AdsBaseObject(driver, urlBuilder.getUrlForPath(wikiName, article));
String gptPageParams = wikiPage.getGptPageParams(AdsContent.TOP_LB);
if (paramShouldPresent) {
Assertion.assertStringContains(gptPageParams, gptPattern);
} else {
Assertion.assertStringNotContains(gptPageParams, gptPattern);
}
}
Aggregations