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();
}
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));
}
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);
}
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.");
}
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);
}
Aggregations