use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsTrackingPixels method adsTrackingPixelSent.
@UseUnstablePageLoadStrategy
@NetworkTrafficDump(useMITM = true)
@Execute(mockAds = "true")
@Test(groups = "AdsTrackingPixels", dataProviderClass = AdsDataProvider.class, dataProvider = "adsTrackingPixelsSent")
public void adsTrackingPixelSent(String wiki, String urlParam, String[] pixelUrls) {
networkTrafficInterceptor.startIntercepting();
String testedPage = urlBuilder.getUrlForPath(wiki, urlParam);
AdsBaseObject adsBaseObject = new AdsBaseObject(driver, testedPage);
assertTrackingPixelsSent(adsBaseObject, pixelUrls);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsTrackingPixels method adsTrackingPixelsOnConsecutivePages.
@NetworkTrafficDump
@Test(groups = "AdsTrackingPixels", dataProviderClass = AdsDataProvider.class, dataProvider = "adsTrackingPixelsOnConsecutivePages")
@Execute(mockAds = "true")
public void adsTrackingPixelsOnConsecutivePages(Page page, String[] articles, String[] urls) {
// Check tracking pixels on first page view
networkTrafficInterceptor.startIntercepting();
String testedPage = urlBuilder.getUrlForPage(page);
AdsBaseObject adsBaseObject = new AdsBaseObject(driver, testedPage);
assertTrackingPixelsSent(adsBaseObject, urls);
// Check tracking pixels on consecutive page views
for (String linkName : articles) {
networkTrafficInterceptor.startIntercepting();
adsBaseObject.clickOnArticleLink(linkName);
assertTrackingPixelsSent(adsBaseObject, urls);
}
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsPrefooters method adsMiddlePrefooter.
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsMiddlePrefooter", groups = "AdsMiddlePrefooter")
public void adsMiddlePrefooter(String wikiName, String path, Dimension windowResolution, boolean middlePrefooterEnabled) {
String testedPage = urlBuilder.getUrlForPath(wikiName, path);
AdsBaseObject adsBaseObject = new AdsBaseObject(driver, testedPage, windowResolution);
adsBaseObject.scrollToFooter();
boolean middlePrefooterOnPage = adsBaseObject.isMiddlePrefooterOnPage();
Assertion.assertEquals(middlePrefooterOnPage, middlePrefooterEnabled, "Middle prefooter on page: " + middlePrefooterOnPage);
if (middlePrefooterEnabled) {
adsBaseObject.verifyMiddlePrefooterAdPresent();
}
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsVuapOasisAutoplay method vuapAutoplayShouldStartPlayingAdvertisementAutomatically.
@Test(groups = "AdsVuapAutoplayAutoplayOasis", dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapAutoplayDesktop")
public void vuapAutoplayShouldStartPlayingAdvertisementAutomatically(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);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsVuapOasisAutoplay method vuapAutoplayShouldEnd.
@Test(groups = "AdsVuapAutoplayEndOasis", dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapAutoplayDesktop")
public void vuapAutoplayShouldEnd(Page page, String slot, String videoIframeSelector) {
new AdsBaseObject(driver, urlBuilder.getUrlForPage(page), WindowSize.DESKTOP);
final AutoplayVuap vuap = new AutoplayVuap(driver, slot, videoIframeSelector);
VuapAssertions.verifyReplyButtonDisplayedAfterVideoEnds(vuap, MAX_AUTOPLAY_MOVIE_DURATION);
}
Aggregations