Search in sources :

Example 26 with AdsBaseObject

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);
}
Also used : AutoplayVuap(com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap) AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test)

Example 27 with AdsBaseObject

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);
}
Also used : AutoplayVuap(com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap) AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test)

Example 28 with AdsBaseObject

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));
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject)

Example 29 with AdsBaseObject

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

Example 30 with AdsBaseObject

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));
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) VideoFanTakeover(com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover) Test(org.testng.annotations.Test)

Aggregations

AdsBaseObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject)87 Test (org.testng.annotations.Test)79 AutoplayVuap (com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap)29 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)15 NetworkTrafficDump (com.wikia.webdriver.common.core.annotations.NetworkTrafficDump)12 VideoFanTakeover (com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover)12 Execute (com.wikia.webdriver.common.core.annotations.Execute)3 UseUnstablePageLoadStrategy (com.wikia.webdriver.common.driverprovider.UseUnstablePageLoadStrategy)3 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)2 JavascriptActions (com.wikia.webdriver.common.core.elemnt.JavascriptActions)2 SonySideViewObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.SonySideViewObject)2 Dimension (org.openqa.selenium.Dimension)2 DontRun (com.wikia.webdriver.common.core.annotations.DontRun)1 HarEntry (net.lightbody.bmp.core.har.HarEntry)1