Search in sources :

Example 1 with NetworkTrafficDump

use of com.wikia.webdriver.common.core.annotations.NetworkTrafficDump in project selenium-tests by Wikia.

the class TestCorrelatorDFP method correlatorIDInQueryStringShouldBeTheSameMercury.

@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(groups = "DFPCorrelatorMercury")
@NetworkTrafficDump
@Execute(onWikia = "project43")
public void correlatorIDInQueryStringShouldBeTheSameMercury() {
    networkTrafficInterceptor.startIntercepting("DFPCorrelator");
    new HomePage().open();
    networkTrafficInterceptor.logDFP(correlatorMobile);
}
Also used : HomePage(com.wikia.webdriver.pageobjectsfactory.pageobject.HomePage) NetworkTrafficDump(com.wikia.webdriver.common.core.annotations.NetworkTrafficDump) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 2 with NetworkTrafficDump

use of com.wikia.webdriver.common.core.annotations.NetworkTrafficDump in project selenium-tests by Wikia.

the class TestCorrelatorDFP method correlatorIDInQueryStringShouldBeTheSameOasis.

@Test(groups = "DFPCorrelatorOasis")
@NetworkTrafficDump
@Execute(onWikia = "project43")
public void correlatorIDInQueryStringShouldBeTheSameOasis() {
    networkTrafficInterceptor.startIntercepting("DFPCorrelator");
    new HomePage().open();
    networkTrafficInterceptor.logDFP(correlatorDesktop);
}
Also used : HomePage(com.wikia.webdriver.pageobjectsfactory.pageobject.HomePage) NetworkTrafficDump(com.wikia.webdriver.common.core.annotations.NetworkTrafficDump) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 3 with NetworkTrafficDump

use of com.wikia.webdriver.common.core.annotations.NetworkTrafficDump 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 4 with NetworkTrafficDump

use of com.wikia.webdriver.common.core.annotations.NetworkTrafficDump 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 5 with NetworkTrafficDump

use of com.wikia.webdriver.common.core.annotations.NetworkTrafficDump in project selenium-tests by Wikia.

the class TestAdsTrackingPixels method adsTrackingPixelSentAuthPage.

@NetworkTrafficDump(useMITM = true)
@Test(groups = "AdsTrackingPixelsAuthPage", dataProviderClass = AdsDataProvider.class, dataProvider = "adsTrackingPixelsSentAuthPage")
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@DontRun(env = { "preview", "sandbox" })
public void adsTrackingPixelSentAuthPage(String wiki, String page, String[] pixelUrls) {
    networkTrafficInterceptor.startIntercepting();
    String testedPage = urlBuilder.getUrlForWiki(wiki) + page;
    AdsBaseObject adsBaseObject = new AdsBaseObject(driver, testedPage);
    assertTrackingPixelsSent(adsBaseObject, pixelUrls);
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) NetworkTrafficDump(com.wikia.webdriver.common.core.annotations.NetworkTrafficDump) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser) DontRun(com.wikia.webdriver.common.core.annotations.DontRun)

Aggregations

NetworkTrafficDump (com.wikia.webdriver.common.core.annotations.NetworkTrafficDump)29 Test (org.testng.annotations.Test)29 VideoFanTakeover (com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover)15 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)13 AdsBaseObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject)12 FandomVideoFanTakeover (com.wikia.webdriver.pageobjectsfactory.componentobject.ad.FandomVideoFanTakeover)7 AdsFandomObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsFandomObject)7 Execute (com.wikia.webdriver.common.core.annotations.Execute)5 DontRun (com.wikia.webdriver.common.core.annotations.DontRun)2 HomePage (com.wikia.webdriver.pageobjectsfactory.pageobject.HomePage)2 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)2 AdsOoyalaObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsOoyalaObject)2 AdsPageFairObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsPageFairObject)2 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)1 UseUnstablePageLoadStrategy (com.wikia.webdriver.common.driverprovider.UseUnstablePageLoadStrategy)1 AdsPrebidObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsPrebidObject)1 AdsTaboolaObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsTaboolaObject)1 InteractiveMapPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapPageObject)1 HarEntry (net.lightbody.bmp.core.har.HarEntry)1