use of com.wikia.webdriver.common.core.annotations.InBrowser 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.InBrowser 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.InBrowser 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();
}
use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.
the class TestAdsVuapMercury method adsImageClickedOpensNewPageMercury.
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@NetworkTrafficDump(useMITM = true)
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsVuapMercury", groups = "AdsImageClickedOpensNewPageMercury")
public void adsImageClickedOpensNewPageMercury(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.clickOnAdImage();
String tabUrl = ads.switchToNewBrowserTab();
videoFanTakeover.verifyFandomTabOpened(tabUrl);
}
use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.
the class GuidelinesTests method regularUserOnDesktopCanSeeGuidelinesHeroUnit.
@Test(groups = "discussions-regularUserOnDesktopCanSeeGuidelinesHeroUnit")
@Execute(asUser = User.USER_6)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void regularUserOnDesktopCanSeeGuidelinesHeroUnit() {
GuidelinesPage guidelinesPage = new GuidelinesPage();
guidelinesPage.open();
Assertion.assertTrue(guidelinesPage.isGuidelinesHeroUnitDisplayed());
}
Aggregations