Search in sources :

Example 6 with AdsBaseObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.

the class TestAdsBtfBlocking method adsAtfDelayBtfOasis.

@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "delayBtf", groups = "AdsBtfBlockingOasis")
@RelatedIssue(issueID = "ADEN-4344")
public void adsAtfDelayBtfOasis(String wikiName, String article, boolean isWgVarOn) throws InterruptedException {
    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), AdsContent.MEDREC);
    Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.TOP_LB), AdsContent.TOP_LB);
    Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.INVISIBLE_SKIN), AdsContent.INVISIBLE_SKIN);
    Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.PREFOOTER_LEFT), AdsContent.PREFOOTER_LEFT);
    Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.PREFOOTER_RIGHT), AdsContent.PREFOOTER_RIGHT);
    Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.LEFT_SKYSCRAPPER_2), AdsContent.LEFT_SKYSCRAPPER_2);
    Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.FLOATING_MEDREC), AdsContent.FLOATING_MEDREC);
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Example 7 with AdsBaseObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.

the class TestAdsMonitoringOasis method AdsMonitoringOasis.

@Test(groups = { "AdsMonitoringOasis" }, dataProviderClass = AdsDataProvider.class, dataProvider = "popularSites")
public void AdsMonitoringOasis(String wikiName, String path) {
    String testedPage = urlBuilder.getUrlForPath(wikiName, path);
    AdsBaseObject wikiPage = new AdsBaseObject(driver, testedPage, BROWSER_DIMENSION);
    wikiPage.verifyMedrec();
    wikiPage.verifyTopLeaderboard();
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test)

Example 8 with AdsBaseObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.

the class TestAdsMonocolor method adsMonocolorOasis.

@Test(groups = "AdsMonocolorOasis", dataProviderClass = AdsDataProvider.class, dataProvider = "adsMonocolorOasis")
public void adsMonocolorOasis(String wikiName, String pageName) {
    String testPage = urlBuilder.getUrlForPath(wikiName, pageName);
    AdsBaseObject adsBaseObject = new AdsBaseObject(driver, testPage);
    adsBaseObject.verifyMonocolorAd(AdsContent.TOP_LB);
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test)

Example 9 with AdsBaseObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.

the class TestAdsOnSpecial method TestAdsOnSpecialPages.

@Test(groups = { "TestAdsOnSpecialPages" }, dataProviderClass = AdsDataProvider.class, dataProvider = "specialPages")
public void TestAdsOnSpecialPages(String wikiName, String article, String lineItemId, String adUnit, String leaderboardSlot, String prefooterSlot, Dimension resolution) throws Exception {
    String testedPage = urlBuilder.getUrlForPath(wikiName, article);
    AdsBaseObject ads = new AdsBaseObject(driver, testedPage, resolution);
    ads.verifyGptIframe(adUnit, leaderboardSlot, "gpt");
    ads.verifyGptAdInSlot(leaderboardSlot, lineItemId, "");
    ads.verifyGptIframe(adUnit, prefooterSlot, "gpt");
    ads.verifyGptAdInSlot(prefooterSlot, lineItemId, "");
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test)

Example 10 with AdsBaseObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.

the class TestAdsBtfBlocking method adsAtfOnTabletOasis.

/**
   * https://wikia-inc.atlassian.net/browse/ADEN-2156 Test whether ads on small screens are
   * displayed when wgAdDriverDelayBelowTheFold is enabled
   */
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "disableBtf", groups = "AdsBtfBlockingOasis")
public void adsAtfOnTabletOasis(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, TABLET_PAGE_SIZE);
    adsBaseObject.waitForPageLoadedWithGpt();
    Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.TOP_LB), AdsContent.TOP_LB);
    Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.PREFOOTER_LEFT), AdsContent.PREFOOTER_LEFT);
    Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.PREFOOTER_RIGHT), AdsContent.PREFOOTER_RIGHT);
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test)

Aggregations

AdsBaseObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject)87 Test (org.testng.annotations.Test)79 AutoplayVuap (com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap)29 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)15 NetworkTrafficDump (com.wikia.webdriver.common.core.annotations.NetworkTrafficDump)12 VideoFanTakeover (com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover)12 Execute (com.wikia.webdriver.common.core.annotations.Execute)3 UseUnstablePageLoadStrategy (com.wikia.webdriver.common.driverprovider.UseUnstablePageLoadStrategy)3 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)2 JavascriptActions (com.wikia.webdriver.common.core.elemnt.JavascriptActions)2 SonySideViewObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.SonySideViewObject)2 Dimension (org.openqa.selenium.Dimension)2 DontRun (com.wikia.webdriver.common.core.annotations.DontRun)1 HarEntry (net.lightbody.bmp.core.har.HarEntry)1