Search in sources :

Example 46 with AdsBaseObject

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

Example 47 with AdsBaseObject

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

Example 48 with AdsBaseObject

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

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));
}
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 50 with AdsBaseObject

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

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