use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsVuapResolvedState method vuapDefaultStateShouldMute.
@Test(groups = "AdsVuapDefaultStateMuteOasis", dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapResolvedStateDesktop")
public void vuapDefaultStateShouldMute(Page page, String slot, String videoIframeSelector) {
new AdsBaseObject(driver, urlBuilder.getUrlForPage(page), WindowSize.DESKTOP);
final AutoplayVuap vuap = new AutoplayVuap(driver, slot, videoIframeSelector);
VuapAssertions.verifyVideoUnmuteAndMute(vuap);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsVuapResolvedState method vuapDefaultStateShouldStartPlayingAdvertisementAutomatically.
@Test(groups = "AdsVuapDefaultStateAutoplayOasis", dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapResolvedStateDesktop")
public void vuapDefaultStateShouldStartPlayingAdvertisementAutomatically(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);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject 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.pageobject.adsbase.AdsBaseObject 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));
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject 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));
}
Aggregations