Search in sources :

Example 56 with AdsBaseObject

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

the class TestAdsTrackingPixels method adsTrackingPixelSent.

@UseUnstablePageLoadStrategy
@NetworkTrafficDump(useMITM = true)
@Execute(mockAds = "true")
@Test(groups = "AdsTrackingPixels", dataProviderClass = AdsDataProvider.class, dataProvider = "adsTrackingPixelsSent")
public void adsTrackingPixelSent(String wiki, String urlParam, String[] pixelUrls) {
    networkTrafficInterceptor.startIntercepting();
    String testedPage = urlBuilder.getUrlForPath(wiki, urlParam);
    AdsBaseObject adsBaseObject = new AdsBaseObject(driver, testedPage);
    assertTrackingPixelsSent(adsBaseObject, pixelUrls);
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) NetworkTrafficDump(com.wikia.webdriver.common.core.annotations.NetworkTrafficDump) UseUnstablePageLoadStrategy(com.wikia.webdriver.common.driverprovider.UseUnstablePageLoadStrategy) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 57 with AdsBaseObject

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

the class TestAdsTrackingPixels method adsTrackingPixelsOnConsecutivePages.

@NetworkTrafficDump
@Test(groups = "AdsTrackingPixels", dataProviderClass = AdsDataProvider.class, dataProvider = "adsTrackingPixelsOnConsecutivePages")
@Execute(mockAds = "true")
public void adsTrackingPixelsOnConsecutivePages(Page page, String[] articles, String[] urls) {
    // Check tracking pixels on first page view
    networkTrafficInterceptor.startIntercepting();
    String testedPage = urlBuilder.getUrlForPage(page);
    AdsBaseObject adsBaseObject = new AdsBaseObject(driver, testedPage);
    assertTrackingPixelsSent(adsBaseObject, urls);
    // Check tracking pixels on consecutive page views
    for (String linkName : articles) {
        networkTrafficInterceptor.startIntercepting();
        adsBaseObject.clickOnArticleLink(linkName);
        assertTrackingPixelsSent(adsBaseObject, urls);
    }
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) NetworkTrafficDump(com.wikia.webdriver.common.core.annotations.NetworkTrafficDump) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 58 with AdsBaseObject

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

the class TestAdsPrefooters method adsMiddlePrefooter.

@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsMiddlePrefooter", groups = "AdsMiddlePrefooter")
public void adsMiddlePrefooter(String wikiName, String path, Dimension windowResolution, boolean middlePrefooterEnabled) {
    String testedPage = urlBuilder.getUrlForPath(wikiName, path);
    AdsBaseObject adsBaseObject = new AdsBaseObject(driver, testedPage, windowResolution);
    adsBaseObject.scrollToFooter();
    boolean middlePrefooterOnPage = adsBaseObject.isMiddlePrefooterOnPage();
    Assertion.assertEquals(middlePrefooterOnPage, middlePrefooterEnabled, "Middle prefooter on page: " + middlePrefooterOnPage);
    if (middlePrefooterEnabled) {
        adsBaseObject.verifyMiddlePrefooterAdPresent();
    }
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test)

Example 59 with AdsBaseObject

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

the class TestAdsVuapOasisAutoplay method vuapAutoplayShouldStartPlayingAdvertisementAutomatically.

@Test(groups = "AdsVuapAutoplayAutoplayOasis", dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapAutoplayDesktop")
public void vuapAutoplayShouldStartPlayingAdvertisementAutomatically(Page page, String slot, String videoIframeSelector) {
    new AdsBaseObject(driver, urlBuilder.getUrlForPage(page), WindowSize.DESKTOP);
    final AutoplayVuap vuap = new AutoplayVuap(driver, slot, videoIframeSelector);
    VuapAssertions.verifyVideoPlay(vuap);
}
Also used : AutoplayVuap(com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap) AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test)

Example 60 with AdsBaseObject

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

the class TestAdsVuapOasisAutoplay method vuapAutoplayShouldEnd.

@Test(groups = "AdsVuapAutoplayEndOasis", dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapAutoplayDesktop")
public void vuapAutoplayShouldEnd(Page page, String slot, String videoIframeSelector) {
    new AdsBaseObject(driver, urlBuilder.getUrlForPage(page), WindowSize.DESKTOP);
    final AutoplayVuap vuap = new AutoplayVuap(driver, slot, videoIframeSelector);
    VuapAssertions.verifyReplyButtonDisplayedAfterVideoEnds(vuap, MAX_AUTOPLAY_MOVIE_DURATION);
}
Also used : AutoplayVuap(com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap) 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