Search in sources :

Example 6 with VideoFanTakeover

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

the class TestAdsVuapFandom method adsVuapVideoClosesWhenTapCloseButtonFandomMobile.

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

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

the class TestAdsVuapFandom method adsVideoClosedAfterPlayingFandom.

@Test(dataProviderClass = FandomAdsDataProvider.class, dataProvider = "vuapPage", groups = { "AdsVuapFandomDesktop", "AdsVideoClosedAfterPlayingFandom" })
public void adsVideoClosedAfterPlayingFandom(String pageType, String pageName, String slotName, String iframeId) {
    AdsFandomObject fandomPage = loadPage(pageName, pageType);
    VideoFanTakeover videoFanTakeover = prepareSlot(slotName, iframeId, fandomPage);
    videoFanTakeover.play();
    videoFanTakeover.waitForVideoPlayerHidden();
}
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 8 with VideoFanTakeover

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

the class TestAdsVuapFandom method adsVuapVideoClosesWhenTapCloseButtonFandom.

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

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

the class TestAdsVuapMercury method adsVuapVideoPauseMercury.

@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@NetworkTrafficDump(useMITM = true)
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapMercury", groups = "AdsVuapVideoPauseMercury")
public void adsVuapVideoPauseMercury(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);
    videoFanTakeover.pause();
    double time = videoFanTakeover.getCurrentVideoTimeOnMobile().doubleValue();
    TimeUnit.SECONDS.sleep(DELAY);
    Assert.assertNotEquals(0, videoFanTakeover.getCurrentVideoTimeOnMobile().doubleValue());
    Assert.assertEquals(time, videoFanTakeover.getCurrentVideoTimeOnMobile().doubleValue());
}
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 10 with VideoFanTakeover

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

the class TestAdsVuapMercury method adsVuapVideoClosesWhenTapCloseButtonMercury.

@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@NetworkTrafficDump(useMITM = true)
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapMercury", groups = "AdsVuapVideoClosesWhenTapCloseButtonMercury")
public void adsVuapVideoClosesWhenTapCloseButtonMercury(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.clickOnVideoCloseButton();
    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)

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