Search in sources :

Example 11 with VideoFanTakeover

use of com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover in project selenium-tests by Wikia.

the class TestAdsVuapMercury method adsImageClickedOpensNewPageMercury.

@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@NetworkTrafficDump(useMITM = true)
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapMercury", groups = "AdsImageClickedOpensNewPageMercury")
public void adsImageClickedOpensNewPageMercury(Page page, String slotName, String iframeId, String videoUrl) {
    networkTrafficInterceptor.startIntercepting();
    AdsBaseObject ads = new AdsBaseObject(driver, urlBuilder.getUrlForPage(page));
    scrollToSlot(slotName, ads);
    ads.wait.forSuccessfulResponse(networkTrafficInterceptor, videoUrl);
    VideoFanTakeover videoFanTakeover = new VideoFanTakeover(driver, iframeId, slotName);
    videoFanTakeover.clickOnAdImage();
    String tabUrl = ads.switchToNewBrowserTab();
    videoFanTakeover.verifyFandomTabOpened(tabUrl);
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) VideoFanTakeover(com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover) NetworkTrafficDump(com.wikia.webdriver.common.core.annotations.NetworkTrafficDump) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 12 with VideoFanTakeover

use of com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover in project selenium-tests by Wikia.

the class TestAdsVuapFandom method adsVuapTimeProgressingFandom.

@NetworkTrafficDump
@Test(dataProviderClass = FandomAdsDataProvider.class, dataProvider = "vuapPage", groups = { "AdsVuapFandomDesktop", "AdsVuapTimeProgressingFandom" })
public void adsVuapTimeProgressingFandom(String pageType, String pageName, String slotName, String iframeId) throws InterruptedException {
    AdsFandomObject fandomPage = loadPage(pageName, pageType);
    VideoFanTakeover videoFanTakeover = prepareSlot(slotName, iframeId, fandomPage);
    videoFandomPage(slotName).verifyIsVideoTimeProgresingOnDesktop(networkTrafficInterceptor, videoFanTakeover);
}
Also used : VideoFanTakeover(com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover) FandomVideoFanTakeover(com.wikia.webdriver.pageobjectsfactory.componentobject.ad.FandomVideoFanTakeover) AdsFandomObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsFandomObject) NetworkTrafficDump(com.wikia.webdriver.common.core.annotations.NetworkTrafficDump) Test(org.testng.annotations.Test)

Example 13 with VideoFanTakeover

use of com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover in project selenium-tests by Wikia.

the class TestAdsVuapFandom method adsVuapCheckSlotSizesFandom.

@Test(dataProviderClass = FandomAdsDataProvider.class, dataProvider = "vuapPage", groups = { "AdsVuapFandomDesktop", "AdsVuapCheckSlotSizesFamdom" })
public void adsVuapCheckSlotSizesFandom(String pageType, String pageName, String slotName, String iframeId) throws InterruptedException {
    AdsFandomObject fandomPage = loadPage(pageName, pageType);
    VideoFanTakeover videoFanTakeover = prepareSlot(slotName, iframeId, fandomPage);
    videoFandomPage(slotName).verifySlotSizesVuap(videoFanTakeover);
}
Also used : VideoFanTakeover(com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover) FandomVideoFanTakeover(com.wikia.webdriver.pageobjectsfactory.componentobject.ad.FandomVideoFanTakeover) AdsFandomObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsFandomObject) Test(org.testng.annotations.Test)

Example 14 with VideoFanTakeover

use of com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover in project selenium-tests by Wikia.

the class TestAdsVuapMercury method adsVideoClosedAfterPlayingMercury.

@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@NetworkTrafficDump(useMITM = true)
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapMercury", groups = "AdsTopAdVideoClosesWhenFinishPlaysMercury")
public void adsVideoClosedAfterPlayingMercury(Page page, String slotName, String iframeId, String videoUrl) {
    networkTrafficInterceptor.startIntercepting();
    AdsBaseObject ads = new AdsBaseObject(driver, urlBuilder.getUrlForPage(page));
    scrollToSlot(slotName, ads);
    ads.wait.forSuccessfulResponse(networkTrafficInterceptor, videoUrl);
    VideoFanTakeover videoFanTakeover = new VideoFanTakeover(driver, iframeId, slotName);
    videoFanTakeover.play();
    videoFanTakeover.waitForVideoPlayerHidden();
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) VideoFanTakeover(com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover) NetworkTrafficDump(com.wikia.webdriver.common.core.annotations.NetworkTrafficDump) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 15 with VideoFanTakeover

use of com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover in project selenium-tests by Wikia.

the class TestAdsVuapMercury method adsVuapTimeProgressingMercury.

@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@NetworkTrafficDump(useMITM = true)
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapMercury", groups = "AdsVuapTimeProgressingMercury")
public void adsVuapTimeProgressingMercury(Page page, String slotName, String iframeId, String videoUrl) throws InterruptedException {
    networkTrafficInterceptor.startIntercepting();
    AdsBaseObject ads = new AdsBaseObject(driver, urlBuilder.getUrlForPage(page));
    scrollToSlot(slotName, ads);
    ads.wait.forSuccessfulResponse(networkTrafficInterceptor, videoUrl);
    VideoFanTakeover videoFanTakeover = new VideoFanTakeover(driver, iframeId, slotName);
    videoFanTakeover.play();
    ads.wait.forSuccessfulResponse(networkTrafficInterceptor, URL_FIRSTQUARTILE);
    double quartileTime = videoFanTakeover.getCurrentVideoTimeOnMobile().doubleValue();
    ads.wait.forSuccessfulResponse(networkTrafficInterceptor, URL_MIDPOINT);
    double midTime = videoFanTakeover.getCurrentVideoTimeOnMobile().doubleValue();
    Assertion.assertTrue(videoFanTakeover.isTimeProgressing(quartileTime, midTime));
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) VideoFanTakeover(com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover) NetworkTrafficDump(com.wikia.webdriver.common.core.annotations.NetworkTrafficDump) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Aggregations

VideoFanTakeover (com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover)24 Test (org.testng.annotations.Test)23 NetworkTrafficDump (com.wikia.webdriver.common.core.annotations.NetworkTrafficDump)15 FandomVideoFanTakeover (com.wikia.webdriver.pageobjectsfactory.componentobject.ad.FandomVideoFanTakeover)12 AdsBaseObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject)12 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)11 AdsFandomObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsFandomObject)11