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);
}
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);
}
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);
}
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();
}
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));
}
Aggregations