Search in sources :

Example 16 with VideoFanTakeover

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

the class TestAdsVuapMercury method adsVuapCheckSlotSizesMercury.

@InBrowser(browser = Browser.CHROME, emulator = Emulator.APPLE_IPHONE_6)
@NetworkTrafficDump(useMITM = true)
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapMercury", groups = "AdsVuapCheckSlotSizesMercury")
public void adsVuapCheckSlotSizesMercury(Page page, String slotName, String iframeId, String videoUrl) throws InterruptedException {
    networkTrafficInterceptor.startIntercepting();
    String slotSelector = AdsContent.getSlotSelector(slotName);
    AdsBaseObject ads = new AdsBaseObject(driver, urlBuilder.getUrlForPage(page));
    scrollToSlot(slotName, ads);
    ads.wait.forSuccessfulResponse(networkTrafficInterceptor, videoUrl);
    VideoFanTakeover videoFanTakeover = new VideoFanTakeover(driver, iframeId, slotName);
    videoFanTakeover.waitForAdToLoad();
    double imageHeight = videoFanTakeover.getAdSlotHeight(slotSelector);
    videoFanTakeover.play();
    double videoHeight = videoFanTakeover.getAdVideoHeight();
    Assertion.assertTrue(videoFanTakeover.isVideoAdBiggerThanImageAdMobile(videoHeight, imageHeight));
    videoFanTakeover.waitForVideoPlayerHidden();
    Assertion.assertTrue(videoFanTakeover.isImageAdInCorrectSize(imageHeight, slotSelector));
}
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 17 with VideoFanTakeover

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

the class TestAdsVuapOasis method adsVuapVideoClosesWhenTapCloseButtonOasis.

@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapDesktop", groups = "AdsVuapVideoClosesWhenTapCloseButtonOasis")
public void adsVuapVideoClosesWhenTapCloseButtonOasis(Page page, String slotName, String iframeId) {
    AdsBaseObject ads = new AdsBaseObject(driver, urlBuilder.getUrlForPage(page), WindowSize.DESKTOP);
    scrollToSlot(slotName, ads);
    VideoFanTakeover videoFanTakeover = new VideoFanTakeover(driver, iframeId, slotName);
    videoFanTakeover.play();
    videoFanTakeover.clickOnVideoCloseButton();
    videoFanTakeover.waitForVideoPlayerHidden();
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) VideoFanTakeover(com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover) Test(org.testng.annotations.Test)

Example 18 with VideoFanTakeover

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

the class TestAdsVuapFandom method adsVuapTimeProgressingFandomMobile.

@NetworkTrafficDump(useMITM = true)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(dataProviderClass = FandomAdsDataProvider.class, dataProvider = "vuapPageMobile", groups = { "AdsVuapFandomMobile", "AdsVuapTimeProgressingFandomMobile" })
public void adsVuapTimeProgressingFandomMobile(String pageType, String pageName, String slotName, String iframeId, String videoUrl) throws InterruptedException {
    networkTrafficInterceptor.startIntercepting();
    AdsFandomObject fandomPage = loadPage(pageName, pageType);
    VideoFanTakeover videoFanTakeover = prepareSlot(slotName, iframeId, fandomPage);
    fandomPage.wait.forSuccessfulResponse(networkTrafficInterceptor, videoUrl);
    videoFandomPage(slotName).verifyIsVideoTimeProgresingOnMobile(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) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 19 with VideoFanTakeover

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

the class TestAdsVuapFandom method adsImageClickedOpensNewPageFandom.

@Test(dataProviderClass = FandomAdsDataProvider.class, dataProvider = "vuapPage", groups = { "AdsVuapFandomDesktop", "AdsImageClickedOpensNewPageFandom" })
public void adsImageClickedOpensNewPageFandom(String pageType, String pageName, String slotName, String iframeId) throws InterruptedException {
    AdsFandomObject fandomPage = loadPage(pageName, pageType);
    VideoFanTakeover videoFanTakeover = prepareSlot(slotName, iframeId, fandomPage);
    videoFandomPage(slotName).verifyFandomPageOpened(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 20 with VideoFanTakeover

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

the class TestAdsVuapFandom method adsVuapVideoPauseFandomMobile.

@NetworkTrafficDump(useMITM = true)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(dataProviderClass = FandomAdsDataProvider.class, dataProvider = "vuapPageMobile", groups = { "AdsVuapFandomMobile", "AdsVuapVideoPauseFandomMobile" })
public void adsVuapVideoPauseFandomMobile(String pageType, String pageName, String slotName, String iframeId, String videoUrl) throws InterruptedException {
    networkTrafficInterceptor.startIntercepting();
    AdsFandomObject fandomPage = loadPage(pageName, pageType);
    VideoFanTakeover videoFanTakeover = prepareSlot(slotName, iframeId, fandomPage);
    fandomPage.wait.forSuccessfulResponse(networkTrafficInterceptor, videoUrl);
    videoFandomPage(slotName).verifyIsVideoPausedOnMobile(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) 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