use of com.wikia.webdriver.common.core.annotations.NetworkTrafficDump in project selenium-tests by Wikia.
the class TestAdsVelesTracking method adsTrackingVelesTracked.
@NetworkTrafficDump()
@Test(groups = "AdsTrackingVeles", dataProviderClass = AdsDataProvider.class, dataProvider = "adsVelesTracking")
public void adsTrackingVelesTracked(final Page page, final Map<String, String> positionsAndPrices) {
networkTrafficInterceptor.startIntercepting();
AdsBaseObject pageObject = new AdsBaseObject(driver, urlBuilder.getUrlForPage(page));
Set<HarEntry> entries = findEntriesByUrlPart(pageObject, VELES_TRACKING_REQUEST_PART, positionsAndPrices);
Assertion.assertTrue(wasVelesTrackedIn(entries, positionsAndPrices), "Veles should be tracked only in " + positionsAndPrices);
}
use of com.wikia.webdriver.common.core.annotations.NetworkTrafficDump in project selenium-tests by Wikia.
the class TestAdsVuapFandom method adsImageClickedOpensNewPageFandomMobile.
@NetworkTrafficDump(useMITM = true)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(dataProviderClass = FandomAdsDataProvider.class, dataProvider = "vuapPageMobile", groups = { "AdsVuapFandomMobile", "AdsImageClickedOpensNewPageFandomMobile" })
public void adsImageClickedOpensNewPageFandomMobile(String pageType, String pageName, String slotName, String iframeId, String videoUrl) {
networkTrafficInterceptor.startIntercepting();
AdsFandomObject fandomPage = loadPage(pageName, pageType);
VideoFanTakeover videoFanTakeover = prepareSlot(slotName, iframeId, fandomPage);
fandomPage.wait.forSuccessfulResponse(networkTrafficInterceptor, videoUrl);
videoFandomPage(slotName).verifyFandomPageOpened(videoFanTakeover);
}
use of com.wikia.webdriver.common.core.annotations.NetworkTrafficDump in project selenium-tests by Wikia.
the class TestAdsVuapFandom method adsVuapVideoClosesWhenTapCloseButtonFandomMobile.
@NetworkTrafficDump(useMITM = true)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(dataProviderClass = FandomAdsDataProvider.class, dataProvider = "vuapPageMobile", groups = { "AdsVuapFandomMobile", "AdsVuapVideoClosesWhenTapCloseButtonFandomMobile" })
public void adsVuapVideoClosesWhenTapCloseButtonFandomMobile(String pageType, String pageName, String slotName, String iframeId, String videoUrl) {
networkTrafficInterceptor.startIntercepting();
AdsFandomObject fandomPage = loadPage(pageName, pageType);
VideoFanTakeover videoFanTakeover = prepareSlot(slotName, iframeId, fandomPage);
fandomPage.wait.forSuccessfulResponse(networkTrafficInterceptor, videoUrl);
videoFandomPage(slotName).verifyVideoClosesAfterTapOnCloseButton(videoFanTakeover);
}
use of com.wikia.webdriver.common.core.annotations.NetworkTrafficDump in project selenium-tests by Wikia.
the class TestAdsVuapMercury method adsVuapVideoPauseMercury.
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@NetworkTrafficDump(useMITM = true)
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapMercury", groups = "AdsVuapVideoPauseMercury")
public void adsVuapVideoPauseMercury(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);
videoFanTakeover.pause();
double time = videoFanTakeover.getCurrentVideoTimeOnMobile().doubleValue();
TimeUnit.SECONDS.sleep(DELAY);
Assert.assertNotEquals(0, videoFanTakeover.getCurrentVideoTimeOnMobile().doubleValue());
Assert.assertEquals(time, videoFanTakeover.getCurrentVideoTimeOnMobile().doubleValue());
}
use of com.wikia.webdriver.common.core.annotations.NetworkTrafficDump in project selenium-tests by Wikia.
the class TestAdsVuapMercury method adsVuapVideoClosesWhenTapCloseButtonMercury.
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@NetworkTrafficDump(useMITM = true)
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapMercury", groups = "AdsVuapVideoClosesWhenTapCloseButtonMercury")
public void adsVuapVideoClosesWhenTapCloseButtonMercury(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.clickOnVideoCloseButton();
videoFanTakeover.waitForVideoPlayerHidden();
}
Aggregations