Search in sources :

Example 31 with AdsBaseObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.

the class TestAdsVuapOasis method adsVideoClosedAfterPlayingOasis.

@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapDesktop", groups = "AdsVideoClosesWhenFinishPlaysOasis")
public void adsVideoClosedAfterPlayingOasis(Page page, String slotName, String iframeId) {
    AdsBaseObject ads = new AdsBaseObject(driver, urlBuilder.getUrlForPage(page), WindowSize.DESKTOP);
    scrollToSlot(slotName, ads);
    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) Test(org.testng.annotations.Test)

Example 32 with AdsBaseObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.

the class TestAdsVuapOasis method adsVuapTimeProgressingOasis.

@NetworkTrafficDump
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapDesktop", groups = "AdsVuapTimeProgressingOasis")
public void adsVuapTimeProgressingOasis(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);
    double quartileTime = videoFanTakeover.getCurrentVideoTimeOnDesktop().doubleValue();
    ads.wait.forSuccessfulResponse(networkTrafficInterceptor, URL_MIDPOINT);
    double midTime = videoFanTakeover.getCurrentVideoTimeOnDesktop().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)

Example 33 with AdsBaseObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.

the class TestAdsVuapOasisAutoplay method vuapAutoplayShouldMute.

@Test(groups = "AdsVuapAutoplayEndOasis", dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapAutoplayDesktop")
public void vuapAutoplayShouldMute(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 34 with AdsBaseObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.

the class TestAdsVuapOasisAutoplay method vuapAutoplayShouldHaveLinkToFandomOnImage.

@Test(groups = "AdsVuapAutoplayClickOasis", dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapAutoplayDesktop")
public void vuapAutoplayShouldHaveLinkToFandomOnImage(Page page, String slot, String videoIframeSelector) {
    final String expected = "http://fandom.wikia.com/";
    final AdsBaseObject ads = new AdsBaseObject(driver, urlBuilder.getUrlForPage(page), WindowSize.DESKTOP);
    final AutoplayVuap vuap = new AutoplayVuap(driver, slot, videoIframeSelector);
    vuap.clickOnDefaultStateAdImage();
    final String actual = ads.switchToNewBrowserTab();
    Assert.assertTrue(actual.equals(expected), "Image should point to page on fandom.");
}
Also used : AutoplayVuap(com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap) AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test)

Example 35 with AdsBaseObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.

the class TestAdsProvidersChain method adsProvidersChain.

private void adsProvidersChain(String wikiName, String article, String instantGlobals, String slotName, String providers, Dimension browserDimension) {
    String url = urlBuilder.getUrlForPath(wikiName, article);
    if (StringUtils.isNotEmpty(instantGlobals)) {
        url = urlBuilder.appendQueryStringToURL(url, instantGlobals);
    }
    new AdsBaseObject(driver, url, browserDimension).verifyProvidersChain(slotName, providers);
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject)

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