use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsVuapTheNewGeneration method vuapResolvedStateShouldStartPlayingAfterClickOnReplay.
@Test(groups = { "AdsVuapResolvedStateTng", "AdsVuapResolvedStateAutoplayOasis" }, dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapTngDesktop")
public void vuapResolvedStateShouldStartPlayingAfterClickOnReplay(Page page, String slot, String videoIframeSelector) {
AdsBaseObject ads = openPageWithVideoInLocalStorage(page);
final AutoplayVuap vuap = new AutoplayVuap(driver, slot, videoIframeSelector);
ads.refreshPage();
scrollToSlot(slot, ads);
vuap.replay();
VuapAssertions.verifyVideoPlay(vuap);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsVuapTheNewGeneration method vuapResolvedStateShouldCloseAfterTapingOnCloseButton.
@Test(groups = { "AdsVuapResolvedStateTng", "AdsVuapResolvedStateCloseOasis" }, dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapTngDesktop")
public void vuapResolvedStateShouldCloseAfterTapingOnCloseButton(Page page, String slot, String videoIframeSelector) {
final AdsBaseObject ads = openPageWithVideoInLocalStorage(page);
final AutoplayVuap vuap = new AutoplayVuap(driver, slot, videoIframeSelector);
ads.refreshPage();
scrollToSlot(slot, ads);
vuap.replay();
vuap.pause();
vuap.close();
VuapAssertions.verifyReplyButtonDisplayedAfterVideoClose(vuap, MAX_AUTOPLAY_MOVIE_DURATION);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class FandomVideoFanTakeover method verifyFandomPageOpened.
public void verifyFandomPageOpened(VideoFanTakeover videoFanTakeover) {
AdsBaseObject fandom = new AdsBaseObject(driver);
videoFanTakeover.clickOnAdImage();
Assert.assertTrue(fandom.tabContainsUrl(VideoFanTakeover.AD_REDIRECT_URL));
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsVuapOasis method adsVuapVideoPauseOasis.
@NetworkTrafficDump
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapDesktop", groups = "AdsVuapVideoPauseOasis")
public void adsVuapVideoPauseOasis(Page page, String slotName, String iframeId) throws InterruptedException {
networkTrafficInterceptor.startIntercepting();
AdsBaseObject ads = new AdsBaseObject(driver, urlBuilder.getUrlForPage(page), WindowSize.DESKTOP);
scrollToSlot(slotName, ads);
VideoFanTakeover videoFanTakeover = new VideoFanTakeover(driver, iframeId, slotName);
videoFanTakeover.play();
ads.wait.forSuccessfulResponse(networkTrafficInterceptor, URL_FIRSTQUARTILE);
videoFanTakeover.pause();
double time = videoFanTakeover.getCurrentVideoTimeOnDesktop().doubleValue();
Thread.sleep(DELAY * 1000);
Assert.assertNotEquals(0, videoFanTakeover.getCurrentVideoTimeOnDesktop().doubleValue());
Assert.assertEquals(time, videoFanTakeover.getCurrentVideoTimeOnDesktop().doubleValue());
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsVuapOasis method adsVuapCheckSlotSizesOasis.
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapDesktop", groups = "AdsVuapCheckSlotSizesOasis")
public void adsVuapCheckSlotSizesOasis(Page page, String slotName, String iframeId) throws InterruptedException {
String slotSelector = AdsContent.getSlotSelector(slotName);
AdsBaseObject ads = new AdsBaseObject(driver, urlBuilder.getUrlForPage(page), WindowSize.DESKTOP);
scrollToSlot(slotName, ads);
VideoFanTakeover videoFanTakeover = new VideoFanTakeover(driver, iframeId, slotName);
videoFanTakeover.waitForAdToLoad();
double imageHeight = videoFanTakeover.getAdSlotHeight(slotSelector);
videoFanTakeover.play();
double videoHeight = videoFanTakeover.getAdVideoHeight();
Assertion.assertTrue(videoFanTakeover.isVideoAdBiggerThanImageAdOasis(videoHeight, imageHeight));
videoFanTakeover.waitForVideoPlayerHidden();
Assertion.assertTrue(videoFanTakeover.isImageAdInCorrectSize(imageHeight, slotSelector));
}
Aggregations